yatp icon indicating copy to clipboard operation
yatp copied to clipboard

implement the thread pool core

Open sticnarf opened this issue 5 years ago • 3 comments

The core of the thread pool is about the working threads running the tasks and how they are parked and unparked.

One of the main goals of yatp is to adjust running threads number intelligently to the work intensity. So we shouldn't be too eager to wake up threads when there are new tasks. Instead, we need to detect if current thread number is insufficient. This can be done by calculating the time a task waiting in the queue. When it's too long, we can consider wake up another thread.

sticnarf avatar Dec 03 '19 07:12 sticnarf

Hi I'm new to this project, I would love to contribute, can you give me some head start on how to do solve this issue

hk1997 avatar Dec 09 '19 04:12 hk1997

@hk1997 Thanks for you enthusiasm. The development of the feature is already in progress.

sticnarf avatar Dec 09 '19 06:12 sticnarf

Hi, @hk1997, if you are interested, you can help us to solve issue #12. You can refer to the implement of runner for std futures. I think the two should have a lot of code in common, may need to figure a way to avoid redundant code.

BusyJay avatar Dec 09 '19 07:12 BusyJay