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
We have Promise for asynchronously produced single value, and Publisher for multi values. We are missing a construct for an async action that produces no values.
Options:
We go with Promise
ExecControl.nest(Block someAction, Block then)
Introduce AsyncAction, which is like Promise, but no operations
For 2, the caller of the action would have to no it was async and act accordingly (i.e. no type safety).
For 3, the implementor has to return the code, instead of just doing it. That’s a bit of a pain. In that respect, it’s no different to 1 though.
The text was updated successfully, but these errors were encountered:
In my opinion, the Promise<Void> should be used. Having different types for the same purpose but with different value (or absense of value) does not have benefits, but having only one type, has the benefit that the user should not think about different kind of types.
The big downside to the Promise<Void> approach though is that you have null flying all over the place. It is looking like the most promising option though at this point.
We have
Promise
for asynchronously produced single value, andPublisher
for multi values. We are missing a construct for an async action that produces no values.Options:
For 2, the caller of the action would have to no it was async and act accordingly (i.e. no type safety).
For 3, the implementor has to return the code, instead of just doing it. That’s a bit of a pain. In that respect, it’s no different to 1 though.
The text was updated successfully, but these errors were encountered: