mirror of
https://gitee.com/openharmony/third_party_libuv
synced 2024-12-27 15:04:48 +00:00
threadpool modify
Signed-off-by: liaoxingxing <liaoxingbin@h-partners.com>
This commit is contained in:
parent
51b4c2d8f7
commit
5093f53d36
@ -678,6 +678,10 @@ void uv__work_done(uv_async_t* handle) {
|
|||||||
uv__queue_append(&lfields->wq_sub[i], &wq);
|
uv__queue_append(&lfields->wq_sub[i], &wq);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (loop->active_reqs > 1000) {
|
||||||
|
UV_LOGW("there are %{public}u tasks in loop thread", loop->active_reqs);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
uv_mutex_unlock(&loop->wq_mutex);
|
uv_mutex_unlock(&loop->wq_mutex);
|
||||||
|
|
||||||
@ -762,8 +766,8 @@ void uv__ffrt_work(ffrt_executor_task_t* data, ffrt_qos_t qos)
|
|||||||
#ifdef UV_STATISTIC
|
#ifdef UV_STATISTIC
|
||||||
uv__post_statistic_work(w, WORK_EXECUTING);
|
uv__post_statistic_work(w, WORK_EXECUTING);
|
||||||
#endif
|
#endif
|
||||||
uv_work_t* req = container_of(w, uv_work_t, work_req);
|
|
||||||
#ifdef ASYNC_STACKTRACE
|
#ifdef ASYNC_STACKTRACE
|
||||||
|
uv_work_t* req = container_of(w, uv_work_t, work_req);
|
||||||
LibuvSetStackId((uint64_t)req->reserved[3]);
|
LibuvSetStackId((uint64_t)req->reserved[3]);
|
||||||
#endif
|
#endif
|
||||||
w->work(w);
|
w->work(w);
|
||||||
@ -778,8 +782,8 @@ void uv__ffrt_work(ffrt_executor_task_t* data, ffrt_qos_t qos)
|
|||||||
|| !lfields->wq_sub[qos].next
|
|| !lfields->wq_sub[qos].next
|
||||||
|| !lfields->wq_sub[qos].prev) {
|
|| !lfields->wq_sub[qos].prev) {
|
||||||
rdunlock_closed_uv_loop_rwlock();
|
rdunlock_closed_uv_loop_rwlock();
|
||||||
UV_LOGE("uv_loop(%{public}zu:%{public}#x) in task(%p:%p) is invalid",
|
UV_LOGE("uv_loop(%{public}zu:%{public}#x), task is invalid",
|
||||||
(size_t)loop, loop->magic, req->work_cb, req->after_work_cb);
|
(size_t)loop, loop->magic);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user