Support racy initialization of an Executor's state#108
Support racy initialization of an Executor's state#108notgull merged 6 commits intosmol-rs:masterfrom
Conversation
|
@kettle11 can you test this out in a wasm environment with atomics enabled? This should fix the issue you were running into. |
|
Rebase this on |
|
I'm not sure if we can relax the atomic orderings on the access or not. There's no strict ordering requirements, per se. The worst that happens if it's improperly ordered is it allocates a few extra states that are immediately deallocated. |
|
Yeah I think it's fine to only use |
|
Could we just use |
|
I know there is some weirdness around Let's merge this with |
|
Quick check against the benchmarks seems to show a (mostly) positive improvement over the use of It may be even faster if we could use a |
|
That makes sense; we're basically doing what |
|
Should be ready to go. |
83c4c3b to
14fd269
Compare

Fixes #89. Uses @notgull's suggestion of using a
AtomicPtrwith a racy initialization instead of aOnceCell.For the addition of more
unsafe, I added theclippy::undocumented_unsafe_blockslint at a warn, and fixed a few of the remaining open clippy issues (i.e.Waker::clone_fromalready handling the case where they're equal).Removing
async_lockas a dependency shouldn't be a SemVer breaking change.