ExclusiveCallbackHelper
Helper for a re-occurring pattern where we need to suspend to wait for a result of an asynchronous call and during this wait no other call is allowed to be made.
The specified mutex defines the exclusivity of the instance.
Functions
Link copied to clipboard
Exclusively runs the specified block then suspends until resumeIfSet is called and returns the value that was passed to that. Behavior is undefined if resumeIfSet was called when block returns false.
Link copied to clipboard
Exclusively runs the specified block then suspends until resumeIfSet is called and returns the value that was passed to that. Behavior is undefined if resumeIfSet was called when block returns false.
Link copied to clipboard
Resumes the suspended lockAndWaitForResult with the specified result value.