在线程数>1时,会占满cpu核心

Open
#34 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
35/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
cpp

Research direction

Start in thread_pool.cpp at line 38 and inspect how yield is used when the thread count is greater than one. Reproduce the busy-loop behavior and verify that the thread no longer consumes an entire CPU core while waiting; add or run a focused test if the repository provides one.

Written by the indexing model from the issue text.

Description

thread_pool.cpp38行的yield并不能成功出让线程,导致线程死循环

Dominant language
C++
Stars
752
Forks
94
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from MegEngine/InferLLM

All issues in MegEngine/InferLLM

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.