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
{{ message }}
Repository navigation
Is callback mode required if there's no callback? #556
Callback modes default to 0 which is invalid (btw, we should explain this).
But is 0 valid if there's no callback to apply the mode to? (the callback pointer is nullptr)
Also, do we allow callbacks to be nullptr in all cases?
So in my opinion, nullptr callbacks don't make too much sense especially since, IIRC, all the callbacks have a status that kind of needs to be checked to understand whether the async call succeeded. Naively, I was thinking that it could be useful for something like WaitAny(OnSubmittedWorkDone()), but the issue is that if, for example, there was a validation error on that call, the user might expect that the work is done when in reality it wasn't. For many of the other callbacks, it makes even less sense to have a nullptr callback since the actual result is only obtained via the callback.
Activity
lokokung commentedon Aug 25, 2025
So in my opinion,
nullptrcallbacks don't make too much sense especially since, IIRC, all the callbacks have a status that kind of needs to be checked to understand whether the async call succeeded. Naively, I was thinking that it could be useful for something likeWaitAny(OnSubmittedWorkDone()), but the issue is that if, for example, there was a validation error on that call, the user might expect that the work is done when in reality it wasn't. For many of the other callbacks, it makes even less sense to have anullptrcallback since the actual result is only obtained via the callback.