-
Notifications
You must be signed in to change notification settings - Fork 108
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
Garbage collection of completed tasks #113
Comments
One of the tasks of the dispatcher-fiber is to release terminated worker-fibers (== fibers created by the user-code). The dispatcher-fiber is the first fiber in the ready-queue when the application/thread starts. It always enqueues itself before it hands-over to another worker-fiber (dequeued from the ready-queue). |
Thanks for the quick reply. I can see that the dispatcher fiber is scheduled to run, however in the shared_work scheduler at least, it does not run unless there are no worker fibers pending:
|
right - shared_work was previously in the examples , so I missed the implementation details |
releated to #112 |
The problem is that the dispatcher-fiber is not correctly scheduled in the shared_work algo. |
use work-stealing scheduler instead |
Hi,
Another general issue that appeared in my experience with fiber is that completed tasks do not release their memory until the dispatcher/system fiber runs.
The dispatcher fiber is not scheduled in all (?) / most(?) schedulers unless there are no application fibers pending. It would be great to provide another mechanism to garbage collect completed tasks, either by the user calling a function or by having the dispatcher fiber scheduled with some other priority.
Thanks,
Daniel Chavarria
Trovares Inc.
The text was updated successfully, but these errors were encountered: