Asking for review of custom oneshot

I had to write custom oneshot implementation that allows me to wait it in blocking and in async manner.
I'd appreciate someone take a look to review the implementation.
Mostly I'm looking to find out if my atomics are preventing data races


What's wrong with the usual oneshot channels? Are you in a situation where you don't know whether the receiver is async or not when creating the channel?

If you know whether the receiver is async or not, you can simply pick the appropriate channel type at creation. The sender half of either type of oneshot should work in both synchronous and asynchronous code.

I simply want to give option to do both with the same API

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.