Multiple progress bar in Brainstorm#897
Multiple progress bar in Brainstorm#897Edouard2laire wants to merge 37 commits intobrainstorm-tools:masterfrom
Conversation
78285b8 to
e023ef5
Compare
|
I might have found an issue. edit: It seems it doesn't work even without the update. Here is my system info:
|
There is nothing inherently different for this call for
For the moment, I have not bandwidth to review this PR, it may take a bit before I take a look to it |
No problem. it's not really a urgent PR. Just cosmetic :) it would be nice however, if you or other people of the team could apply the change on their bst_progress file so we can detect 'undesired' behavior linked to the change as you use brainstorm :) |
cosmetic changes minor changes
6846dc6 to
932d54d
Compare
|
Todo;
|
|
ok. this is ready for review. I added a limit on the number of progress bar so it is safe to use. Latter we can then optimize how we use the progress bar over the toolbox to improve the feedback given to the users. |
Hello,
3 years after posting #614, I finally came up with a simple, working design for having multiple progress bars in brainstorm without changing the progress bar API.
The idea is to have one window per progress bar and to keep track of which function invoked each progress bar, to be able to open/close/update the appropriate window.
This should make the management of the progress bar much easier, as each function won't have to worry if a progress bar is already open or if the function they are calling might have a progress bar. This PR only focuses on the change in the progress bar; we might then improve where it is used within brainstorm to provide better info to the user :)
Here is a list of few example i used to test:
1st example:
Example 2: Note that the progress bar of 'internal_A' is closed automatically, as the function is not calling bst_progress('stop'); so there is no risk of ending up with a dozen of open progress bars :)
Exemple 3: with parfor loops
Example with multiple porgress bar within the same function:
Note: there can be a little risk, if bst_progress('stop'); is not called inside the loop, but i guess that's fine. If we don't want that, then we can change
ix = find(strcmp(progress_list, caller_name), 1, 'last');toix = find(strcmp(progress_list, caller_name), 1, 'first');Exemple when using MEM:
