ENH: Make logger thread-safe#406
Conversation
|
Thanks for your suggestion, @ntatsisk Honestly I had forgotten about BTW, There's a segfault from GitHubActions/ubuntu-18.04, do you happen to know why?
To be continued...! |
|
Indeed, the console output becomes unreadable because all threads write unsychronized there but, on the positive side, it works without crashing. In general, that doesn't seem as a problem to my eyes. The reason is that even if each line of the output belonged to a single thread, it wouldn't be helpful either. Imagine 12 or 24 threads taking turns to write just a single line, how could somebody make something out of it? On the other hand, since the log files work, the user could use those if debugging was necessary. That's how I see it! Regarding the segfault, it happens in the |
|
Hi @N-Dekker. I tried to make some comparison between MSVC and MinGW in respect to In conclusion, I still don't know what caused the original |
|
@ntatsisk Hi Konstantinos, thanks for your MSVC/MinGW comparison.
As you said before that the console output becomes unreadable when multiple threads write to the console via |
|
@N-Dekker, yes I agree |
|
@N-Dekker, It looks that it passed the tests. However, I think it is very unlikely that the Can we run the gtest that you wrote in #393 to see if it can pass now? |
Originally based on a code snippet by Konstantinos Ntatsis at pull request SuperElastix#389 ("ENH: Make ElastixMain database creation + loading components thread safe"): SuperElastix#389 (comment)
|
I added the gtest of #393 in the current PR. However, only the "Elastix" check was triggered, if I am not mistaken. Is there a way to repeat the other checks for the different OS builds? Moreover, what additional tests/changes would be necessary so that this PR makes its way to the develop branch? Thanks. |
|
I am closing this one, since #429 solved the issue of multi-threading at user level. |
No description provided.