MCPcopy Create free account
hub / github.com/bytedance/bolt / enterForTerminateLocked

Method enterForTerminateLocked

bolt/exec/Task.cpp:2818–2831  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2816}
2817
2818StopReason Task::enterForTerminateLocked(ThreadState& state) {
2819 if (state.isOnThread() || state.isTerminated) {
2820 state.isTerminated = true;
2821 return StopReason::kAlreadyOnThread;
2822 }
2823 if (pauseRequested_) {
2824 // NOTE: if the task has been requested to pause, then we let the task
2825 // resume code path to close these off thread drivers.
2826 return StopReason::kPause;
2827 }
2828 state.isTerminated = true;
2829 state.setThread();
2830 return StopReason::kTerminate;
2831}
2832
2833void Task::leave(
2834 ThreadState& state,

Callers

nothing calls this directly

Calls 2

setThreadMethod · 0.80
isOnThreadMethod · 0.45

Tested by

no test coverage detected