Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Oneflow-Inc/oneflow
/ IsMainThread
Function
IsMainThread
oneflow/core/thread/thread_manager.h:86–86 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
84
}
85
86
inline bool IsMainThread() { return *MutIsMainThread(); }
87
inline void SetIsMainThread(bool is_main_thread) { *MutIsMainThread() = is_main_thread; }
88
89
COMMAND(SetIsMainThread(true));
Callers
3
ThrowError
Function · 0.85
__Init__
Method · 0.85
TEST
Function · 0.85
Calls
1
MutIsMainThread
Function · 0.85
Tested by
1
TEST
Function · 0.68