yatp
yatp copied to clipboard
implement the thread pool core
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.
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 Thanks for you enthusiasm. The development of the feature is already in progress.
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.