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
[SYCL] Fix circular reference between events and queues (#1226)
There is a potential circular reference between queues and events as a queue can hold a collection of shared pointers to events and events may have a shared pointer to a queue. If a circular reference is created, the only way to currently break the circle is to call wait on the queue, which is not ensured to happen.
To mitigate this, this PR changes makes the reference from an event to a queue a weak pointer. Effectively this will mean that if all remaining references to a queue are from events the queue will die. This affects only an events ability to throw asynchronous errors through the async_handler of the queue if it is destroyed prematurely.
Signed-off-by: Steffen Larsen <[email protected]>
0 commit comments