Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/alibaba/PhotonLibOS
/ thread_yield_fast
Function
thread_yield_fast
thread/thread.cpp:1311–1314 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
1309
}
1310
1311
inline void thread_yield_fast() {
1312
auto sw = AtomicRunQ().goto_next();
1313
switch_context(sw.from, sw.to);
1314
}
1315
1316
int thread_yield_to(thread* th) {
1317
if (unlikely(th == nullptr)) { // yield to any thread
Callers
2
thread_pong
Function · 0.85
test_thread_switch
Function · 0.85
Calls
3
AtomicRunQ
Class · 0.85
switch_context
Function · 0.85
goto_next
Method · 0.80
Tested by
2
thread_pong
Function · 0.68
test_thread_switch
Function · 0.68