Fire events when a Default Task is started, finished, or cancelled#431
Fire events when a Default Task is started, finished, or cancelled#431NicoKiaru wants to merge 7 commits intoscijava:masterfrom
Conversation
|
I've added a test because it seems there could be some issues when many tasks are executed in parallel. Maybe it's not that critical, but maybe it is. The test However, it seems that from time to time, either a few tasks are not done, or many are not done. Try the test a few times, and you will see that it fails (around 1 time every 3 or 4 times, with java jdk 1.8.0_322 aws corretto, Win 10). Here's a few issues I had by looking at visual vm Thread dumps, showing why some tasks/threads are stuck: I think the first situation is when there are way too many threads (I've tested with 5000), but here the thread pool reaches a limit (around 3700 in my configuration): Sometimes, System.out.println creates this issue - especially if you put a println within the task: Another potential Thread issue: That's hard to debug. Do we care ? I think yes. It's important to get consistently no error with a thousand parallel tasks. |
|
@NicoKiaru Could you remind me why this PR ended up getting closed? Did we discuss and decide not to go this direction? I don't remember. |
|
I rewrote the PR a bit more cleanly in #432 (merged). I should have mentioned it when closing this PR. Regarding the many threads issue, I think it's ok, we're not supposed to start this many threads directly with |
|
I've summarised the status of the 'task feature' in https://forum.image.sc/t/demo-and-proposal-new-progress-bars-for-fiji/64956/5 |
One question : should
isDonebe set to true when the task is cancelled ?