Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement the thread pool core #11

Open
sticnarf opened this issue Dec 3, 2019 · 3 comments
Open

implement the thread pool core #11

sticnarf opened this issue Dec 3, 2019 · 3 comments
Milestone

Comments

@sticnarf
Copy link
Contributor

sticnarf commented Dec 3, 2019

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.

@hk1997
Copy link

hk1997 commented Dec 9, 2019

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

@sticnarf
Copy link
Contributor Author

sticnarf commented Dec 9, 2019

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

@BusyJay
Copy link
Member

BusyJay commented Dec 9, 2019

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.

@sticnarf sticnarf added this to the 0.1 milestone Dec 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants