5 ms·
Unfortunately, as of now you cannot move an lthread from one scheduler to another but it can be implemented. May I ask why you want to do that? I am working on
by halayli 15y ago
Unfortunately, as of now you cannot move an lthread from one scheduler to another but it can be implemented. May I ask why you want to do that?
I am working on lthread_compute for compute intensive tasks which will offload the work to a worker pool and resume the function once it's done.
- dkersten 15y agoWell, what I basically want is a TBB-like task scheduler, but with the ability to pause and resume tasks without running them to completion (to allow tasks to "block" - the condition variables in lthread are perfect for this). To do this in plain TBB, I would have to split the task into multiple smaller tasks, since there is no way to suspend a task but have the scheduler still process other tasks and then later resume the task mid-function. I want to be able to move tasks to other threads so that if a thread runs out of work early it can steal work from a busy thread. Unfortunately I just realised that for the project I have in mind I won't be able to use lthread as I won't be able to release it under the GPL, but I really like what I see so far and I also really like the sound of lthread_compute, so I am definitely keeping an eye on the project and will likely make use of it in the future.
- halayli 15y agoAh, that's unfortunate. I'll be implementing lthread_compute during the holidays. Keep an eye on that. :)