Open wang384670111 opened 7 months ago
SeqCst is overly restrictive. I believe that the ordering can be appropriately modified.
SeqCst
COUNTER and NEXT_ID are used for multithreading counting purposes and don’t synchronize with other locals, so using Relaxed ordering is sufficient.
COUNTER
NEXT_ID
Relaxed
https://github.com/neon-bindings/neon/blob/09fce7935b50cdefb1a3eea38116946f070b077a/crates/neon/src/thread/mod.rs#L115 https://github.com/neon-bindings/neon/blob/09fce7935b50cdefb1a3eea38116946f070b077a/crates/neon/src/lifecycle.rs#L40
SeqCst
is overly restrictive. I believe that the ordering can be appropriately modified.COUNTER
andNEXT_ID
are used for multithreading counting purposes and don’t synchronize with other locals, so usingRelaxed
ordering is sufficient.https://github.com/neon-bindings/neon/blob/09fce7935b50cdefb1a3eea38116946f070b077a/crates/neon/src/thread/mod.rs#L115 https://github.com/neon-bindings/neon/blob/09fce7935b50cdefb1a3eea38116946f070b077a/crates/neon/src/lifecycle.rs#L40