Arbortext Command Language > Functions by Alphabetical Listing > event_process
  
event_process
event_process ([blockall])
This function enters a nested event loop to block the current thread of ACL execution until some until other event causes an event_stop_process call. If the blockall parameter is specified and non-zero, then all user input events are blocked. This might be useful to block the user while waiting for input from a network channel; the callback set with channel_set_callback would resume the execution thread by calling event_stop_process.
This function returns the value passed to the event_stop_process call that terminated the nested event loop.
* 
This function should be used with extreme care; an application should only call event_process if it has a method for calling event_stop_process, for example, from a dialog item callback, timer callback, channel callback, or other similar callbacks.
Example:
function timerCallback()
{
event_stop_process(1);
return 0; # cancel timer
}
timer_add_callback(500, "timerCallback");
window_set(0, "message", "waiting...");
# wait 5 seconds, blocking all input
$result = event_process(1);
window_set(0, "message", "event_process returned $result");
Related Topics
event_stop_process function
channel_set_callback function
timer_add_callback function
disable_windows function