bree icon indicating copy to clipboard operation
bree copied to clipboard

[feat] Allow forced thread termination after timeout period

Open naz opened this issue 4 years ago • 0 comments

Problem

Graceful thread termination is currently relying on correct handling of 'cancel' event inside of the job, which allows for hanging thread termination if job was incorrectly implemented.

Solution

To make thread termination bullet-proof bree could introduce a grace period after which thread would be terminated no matter what. Termination period could be parameterized through property like terminateWorkerAfterMs (similar to existing closeWorkerAfterMs). Would also make sense to have a a smart default like 60s (value taken from thin air and needs discussion/research) to make sure threads are always terminated after certain time.

naz avatar Nov 19 '20 00:11 naz