+ //
+ // Notice that it also returns true if main thread id hadn't been
+ // initialized yet on the assumption that it's too early in wx startup
+ // process for any other threads to have been created in this case.
+ static bool IsMain()
+ {
+ return !ms_idMainThread || GetCurrentId() == ms_idMainThread;
+ }
+
+ // Return the main thread id
+ static wxThreadIdType GetMainId() { return ms_idMainThread; }