Using sleep was not only fragile but also resulted in tons of TSAN
errors, so replace it by the similar approach to the one which was
already used to wait for the threads to start up.
This is horribly inefficient but we don't care about this in the test
and, at least, this does ensure that the threads exit before it ends.
Don't use sleep in this test as the thread may terminate before it
returns, possibly resulting in crashes that the existing comment warned
about, and definitely resulting in TSAN errors.
Also ensure that the thread doesn't terminate instead of just hoping
that it doesn't do it because it doesn't have time to run 30 iterations
of its entry function by passing the special value of 0 to ctor, which
explicitly prevents the thread from terminating on its own.
This is a combination of running clang-tidy with modernize-use-nullptr
check for some ports (GTK, X11, OSX) and manual changes to the ports for
which it couldn't be used easily (MSW, DFB) and also manually updating
the docs.
Also replace NULL with null or nullptr in the comments as this is more
consistent with the use of nullptr in the code and makes it simpler to
grep for the remaining occurrences of NULL itself.
And also use null in the assert messages.
Only a few occurrences of "NULL" are still left in non-C files, mostly
corresponding to unclear comments or string output which it might not be
safe to change.
This keyword is not expanded by Git which means it's not replaced with the
correct revision value in the releases made using git-based scripts and it's
confusing to have lines with unexpanded "$Id$" in the released files. As
expanding them with Git is not that simple (it could be done with git archive
and export-subst attribute) and there are not many benefits in having them in
the first place, just remove all these lines.
If nothing else, this will make an eventual transition to Git simpler.
Closes#14487.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The m_i field is only used in the currently commented out debugging messages,
suppress a warning about it being unused.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74521 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775