M2 icon indicating copy to clipboard operation
M2 copied to clipboard

Killing threads on function interrupt

Open mahrud opened this issue 1 year ago • 0 comments
trafficstars

If I run a function which starts a number of threads and waits for them to finish, but then I interrupt the parent function, the orphaned threads continue to run and I think there's no way to cancel them.

It would be great to:

  1. when a local dictionary closes (e.g. function ends or is interrupted and control is handed back to the user) any remaining active thread objects in the local dictionary which are now inaccessible (i.e. not returned to the user) should be cancelled.
  2. there should be a way to retrieve all active threads, and a method to cancel them all.

mahrud avatar Sep 04 '24 12:09 mahrud