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
Thank you (again!) for this great project. It's a lifesaver if you need to timeout Promise-based code. 馃檹
I just wanted to document a potential improvement. We have code that uses CAF to add timeouts around async code. Within one CAF function we pass signal down to sub-CAF functions. This lets us separate async logic but still have it elegantly timeout.
But! If you forget to pass signal down to a sub-CAF function that expects it, a fairly unhelpful error is show:
Code example
// within a CAF function, call a sub-CAF function, but we forgot to pass `signal`yieldthis.getAndSyncUsers(syncRequest,conversationMembers.members,seenUsers);// signature for the sub-CAF function, but we forgot to accept `signal`staticgetAndSyncUsers=CAF(function*getAndSyncUsers(syncRequest: SyncRequest,users: Array,seenUsers: Object,){// ...implementation...});
The text was updated successfully, but these errors were encountered:
Thank you (again!) for this great project. It's a lifesaver if you need to timeout Promise-based code. 馃檹
I just wanted to document a potential improvement. We have code that uses CAF to add timeouts around async code. Within one CAF function we pass
signal
down to sub-CAF functions. This lets us separate async logic but still have it elegantly timeout.But! If you forget to pass
signal
down to a sub-CAF function that expects it, a fairly unhelpful error is show:Code example
The text was updated successfully, but these errors were encountered: