[yew-devel] [PATCH yew-widget-toolkit v2 0/2] improve error message on store locks and add non-panicking functions

Shannon Sterz s.sterz at proxmox.com
Tue May 6 14:44:43 CEST 2025


this series adds more context to a locking failure in the first commit.
the second commit then adds functions that allow components to recover
from not being able to acquire a lock, instead of simply panicking.

--

changes since v1 (thanks @ Dominik):

- rephrase the commit message of the first commit

changes since rfc:

- don't use `UnwrapThrowExt` as it does not improve error handling
  meaningfully. (thanks @ Dominik)
- add `try_read()` and `try_write()` functions to allow components to
  recover from not being able to acquire a lock instead of panicking.

--

Shannon Sterz (2):
  store: use try_borrow and expect for better error messages
  store: add try_read() and try_write() functions

 src/state/store.rs | 32 +++++++++++++++++++++++++-------
 1 file changed, 25 insertions(+), 7 deletions(-)

--
2.39.5





More information about the yew-devel mailing list