We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a29c5aa commit 33536b0Copy full SHA for 33536b0
Sources/DispatchAsync/DispatchSemaphore.swift
@@ -59,7 +59,8 @@ public class DispatchSemaphore: @unchecked Sendable {
59
public func wait() {
60
// NOTE: wasm is currently mostly single threaded.
61
// And we don't have a Thread.sleep API yet.
62
- // So
+ // So assert that we're on the main actor here. Usage from other
63
+ // actors is not currently supported.
64
MainActor.assertIsolated()
65
assert(value > 0, "DispatchSemaphore is currently only designed for single-threaded use.")
66
value -= 1
0 commit comments