You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tasks are handled by a plain pointer and destruction of a Task is controlled by Event::notify().
It uses an atomic count, a somewhat whacky refcount which only counts down on the two events which could ever possibly end the lifetime of a task: post_event or result_get_event.
(In case the result of a task needs to be kept in the future , because the value wasnt retrieved from the future yet)
However in delete_from_resources() and init_graph() there is still an additional lock required in order to avoid the creation of a dependency in the scheduling graph to some Task which is currently being destroyed. Adding proper refcounting to Tasks would deprecate the need for this spinlock.
It should be considered to avoid unneccesary increment/decrement on the atomic counter.
The text was updated successfully, but these errors were encountered:
Tasks are handled by a plain pointer and destruction of a Task is controlled by
Event::notify()
.It uses an atomic count, a somewhat whacky refcount which only counts down on the two events which could ever possibly end the lifetime of a task:
post_event
orresult_get_event
.(In case the result of a task needs to be kept in the future , because the value wasnt retrieved from the future yet)
However in
delete_from_resources()
andinit_graph()
there is still an additional lock required in order to avoid the creation of a dependency in the scheduling graph to some Task which is currently being destroyed. Adding proper refcounting to Tasks would deprecate the need for this spinlock.It should be considered to avoid unneccesary increment/decrement on the atomic counter.
The text was updated successfully, but these errors were encountered: