You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
observers from ureact have lots of things in common with a classic signal-slot Pattern implemented by boost/signals2, Qt and many other less known libraries (for e.g. KDAB/KDBindings and PG1003/observer).
Unlike ureact's events, signal-slots is not composable. But instead it provides one to many connection between one signal and many slots. Sometimes even backwards connection is possible in a form of collecting results of each slot in a container when signal is emitted. Also, signal-slots can have several args to pass instead of a single one in ureact.
Interesting features I have seen so far:
if slot's functor receives less arguments than passed, then it is OK. It can be interesting not only for observer functions, but all other functions too
connection can be temporary blocked. It is alive, bun don't call functor until unblocked
lifetime tracking of slot's arguments See boost/signals2 tutorial. Looks complex, but it can allow more safe callback execution. It can be done manually inside observer callback though. Special case of such tracking is connection_owner.
slots execution ordering. I'm not sure is it required, but it seems that unordered execution of observer callbacks could be a problem in some cases. I don't know should ordering be on per reactive value basis, or on context basis instead.
The text was updated successfully, but these errors were encountered:
observers from ureact have lots of things in common with a classic signal-slot Pattern implemented by boost/signals2, Qt and many other less known libraries (for e.g. KDAB/KDBindings and PG1003/observer).
Unlike ureact's events, signal-slots is not composable. But instead it provides one to many connection between one signal and many slots. Sometimes even backwards connection is possible in a form of collecting results of each slot in a container when signal is emitted. Also, signal-slots can have several args to pass instead of a single one in ureact.
Interesting features I have seen so far:
The text was updated successfully, but these errors were encountered: