diff --git a/source/vibe/core/sync.d b/source/vibe/core/sync.d index aaec4f1..faa09a0 100644 --- a/source/vibe/core/sync.d +++ b/source/vibe/core/sync.d @@ -1023,6 +1023,7 @@ package struct SpinLock { bool tryLock() @trusted { + assert(threadID != 0, "SpinLock.setup() was not called."); assert(atomicLoad(locked) != threadID, "Recursive lock attempt."); return cas(&locked, 0, threadID); }