I see such comments in the end part of the function void ClassBrowserBuilderThread::BuildTree()
// Initialisation is done after Init() and at least *one* call to BuildTree().
// Also, in Init() m_InitDone is set to false, directly followed by a
// re-launch of the thread resulting in a call to BuildTree() due to
// posting the semaphore from ClassBrowser.
m_InitDone = true;
wxCommandEvent e2(wxEVT_COMMAND_ENTER, m_idThreadEvent);
Question: I don't understand the comments, I see that m_InitDone never set to false in Init(), can you explain?
What does the m_InitDone usd for?
I see that some times, the function
// initialise itIs directly called from main GUI thread, at this time, the worker thread is forced in paused status now, but does that cause some multiply thread issue?
Since the tree builder thread can send buildTreeEnd event to gui main thread's classbrowser class, can classbrowser class remember some status of the build thread, and do any thing? Currently, the event receiver only print some debug log message.