to do it.
+\membersection{wxApp::IsMainLoopRunning}\label{wxappismainlooprunning}
+
+\constfunc{bool}{IsMainLoopRunning}{\void}
+
+Returns \true if the main event loop is currently running, i.e. if the
+application is inside \helpref{OnRun}{wxapponrun}.
+
+This can be useful to test whether the events can be dispatched. For example,
+if this function returns \false, non-blocking sockets cannot be used because
+the events from them would never be processed.
+
+
\membersection{wxApp::MainLoop}\label{wxappmainloop}
\func{virtual int}{MainLoop}{\void}
// the worker functions - usually not used directly by the user code
// -----------------------------------------------------------------
+ // return true if we're running main loop, i.e. if the events can
+ // (already) be dispatched
+ bool IsMainLoopRunning() const
+ {
+#if wxUSE_EVTLOOP_IN_APP
+ return m_mainLoop != NULL;
+#else
+ return false;
+#endif
+ }
+
// execute the main GUI loop, the function returns when the loop ends
virtual int MainLoop();