Lines Matching defs:state
193 ExecuteState state = task->taskState_;
195 if (state == ExecuteState::RUNNING || state == ExecuteState::ENDING) {
198 napi_value stateValue = NapiHelper::CreateUint32(env, static_cast<uint32_t>(state));
200 napi_set_named_property(env, taskInfoValue, "state", stateValue);
243 bool state = (GetThreadNum() == ConcurrentHelper::GetMaxThreads()) && (GetIdleWorkers() == 0);
244 uint64_t threshold = state ? MIN_TIMEOUT_TIME : MAX_TIMEOUT_TIME;
247 // if the worker thread is idle, just skip it, and only the worker in running state can be marked as timeout
254 // When executing the promise task, the worker state may not be updated and will be
346 char state;
347 if (sscanf_s(buf, "%*d %*s %c", &state, sizeof(state)) != 1) { // 1: state
348 HILOG_ERROR("taskpool: sscanf_s of state failed for %{public}c", state);
351 if (state == 'S') {
386 char state;
389 &state, sizeof(state), &utime) != 2) { // 2: state and utime
390 HILOG_ERROR("taskpool: sscanf_s of state failed for %{public}d", worker->tid_);
393 if (state != 'S' || utime != worker->lastCpuTime_) {
482 // System memory state is moderate and the worker has exeuted tasks, we will try to release it
630 ExecuteState state = task->taskState_.exchange(ExecuteState::CANCELED);
632 if (state == ExecuteState::WAITING && task->currentTaskInfo_ != nullptr) {