Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/acl-dev/acl
/ wait_for_running
Method
wait_for_running
lib_acl_cpp/src/stdlib/thread.cpp:50–59 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
48
}
49
50
void thread::wait_for_running()
51
{
52
if (lock_->cas(0, 1) == 0) {
53
if (thread_id_ == 0) {
54
(void) sync_->pop();
55
}
56
} else if (thread_id_ == 0) {
57
sleep(1);
58
}
59
}
60
61
void* thread::thread_run(void* arg)
62
{
Callers
1
thread_id
Method · 0.80
Calls
3
cas
Method · 0.80
sleep
Function · 0.50
pop
Method · 0.45
Tested by
no test coverage detected