Discussion about this post

User's avatar
Rust Bytes's avatar

Great article and writeup. We will be including this piece in our upcoming newsletter issue.

Thanks for putting this into writing.

Rob Hornby's avatar

Is there a race condition in the register function as well? After getting the current Vacant entry, and before inserting a new Waiting value, could another task also insert its own Waiting value, given that the "check for vacancy then register intent" logic doesn't seem to be atomic?

Is this right, or could someone please explain how that part works? Maybe it's a fail-safe scenario which leads to doing the work twice or more, rather than exactly once?

4 more comments...

No posts

Ready for more?