Closed dfreese closed 4 years ago
Looking at this further, I realize that reserve is owned by the writer, so this isn't actually an issue. I'm not sure if this is any faster either, so I'll close this unless there's a good way to determine if it would actually help. Sorry for the noise!
This is testing my own understanding of how this is working. I was looking at porting a variation of this to C++, when I noticed that the return value of reserve in GrantW::commit_inner is updated in fetch_sub, but the return value of the fetch_sub is not used, forcing another load. This seemed like it could cause problems if the value was updated between the fetch_sub and the load.