Gseos.PumpWaitingMessages
Previous  Top  Next

PumpWaitingMessages()

The function PumpWaitingMessages() allows all message queues to be processed and therefore enables GSEOS to run while a lengthy script is being processed. If you do not yield while running a lengthy script the GSEOS user interface and block processing will not be processed and seem frozen. Call this function several times (probably within a time consuming loop) to keep the system responsive. An alternative to using this cooperative preemption scheme is the use of threads. Be careful with this function since it essentially establishes another message pump.

Returns
None

Example
The following example does some lengthy processing and enables the foreground program to execute by calling PumpWaitingMessages().

for i in range(0, 2000):
  fThisTakesAbout200ms()
  Gseos.PumpWaitingMessages()