You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Sema.method_may_suspend_current_fiber is a hand list of std method names (Mutex.lock/enter/enter_mut/set, RwLock.read/write/…, Receiver.recv, Once.call_once) #3052
src/SemaCheck.wmethod_may_suspend_current_fiber decides whether a std method may suspend the current fiber by matching the owner's and method's spelling against a hand-written list. #3045 added Mutex.lock, RwLock.read and RwLock.write to it; every new std method that blocks on a lock has to be remembered here, and a method that merely delegates (RwLock.read is self.enter()) is listed twice.
This is a second ownership system for a fact a signature or body owns once (D110 spirit: facts come from declarations, never a per-stage name list). The route out: the may-suspend fact is an effect of the method's signature (an attribute on the declaration in lib/std/sync.w / channel.w, or derived from the body's call to sync_wait_for_progress / the runtime's park), recorded by Sema once, read here and by MirLower/AsyncLower.
Until then the list is the mechanism; this issue is the backlog item to retire it.
Fixed in #3064 (173ef04) under D195 (delegated): the may-suspend fact is the declaration's — @[suspends] on the std methods in lib/std/sync.w, and the compiler's own declaration of the builtins (Sender.send, Receiver.recv, Task.join_cleanup) beside the names it interns in Sema.w. The hand list in method_may_suspend_current_fiber is gone; §14.3 and the §29.14 attribute index say so. Pinned by test/compile_errors/err_3052_suspends_attribute_in_no_suspend.w.
Activity
Review fixes: traverse ownership, comptime Some from Sema's fact, one…
#2977, #3052 (D195), #2636, #2978: concurrency evidence by reach, @[s…
ehartford commentedon Nov 7, 2026
Fixed in #3064 (173ef04) under D195 (delegated): the may-suspend fact is the declaration's —
@[suspends]on the std methods in lib/std/sync.w, and the compiler's own declaration of the builtins (Sender.send, Receiver.recv, Task.join_cleanup) beside the names it interns in Sema.w. The hand list in method_may_suspend_current_fiber is gone; §14.3 and the §29.14 attribute index say so. Pinned by test/compile_errors/err_3052_suspends_attribute_in_no_suspend.w.