Home › Forums › Development › how to keep track of ThreadUtil.bgRun thread and stop them eventually? › Reply To: how to keep track of ThreadUtil.bgRun thread and stop them eventually?

#66366

InstanceProcessors (and bgInstanceProcessors) has a fixed number of Thread (workers) which are always actives and which can execute an unlimited number of tasks. You cannot stop a task by its Id, at best you can try to interrupt the thread which is currently executing the task but still the task need to check the interrupt state of the thread, and then we need to restore the thread execution so it could execute future submitted tasks.

– Stephane