Re-implement ManualEvent.
This simplifies the logic by separating thread local notifications from cross-thread notifications, as well as replacing lockless operations by a spin lock. The thread local variant of ManualEvent is now also separated into a LocalManualEvent type.
This commit is contained in:
parent
e28c6950d7
commit
fdfbb55aa8
3 changed files with 438 additions and 318 deletions
|
@ -1333,6 +1333,10 @@ static this()
|
|||
synchronized (st_threadsMutex)
|
||||
if (!st_threads.any!(c => c.thread is thisthr))
|
||||
st_threads ~= ThreadContext(thisthr, false);
|
||||
|
||||
|
||||
import vibe.core.sync : SpinLock;
|
||||
SpinLock.setup();
|
||||
}
|
||||
|
||||
static ~this()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue