| Prev | Next | Start of Chapter | End of Chapter | Contents | Glossary | Index | Comments | (10 out of 25)

allow other processing

This statement lets G2 interrupt a procedure (enter a wait state) to perform tasks, to service networks, the user interface, the G2 clock, and other current processes (such as rules and procedures) with the same priority. See Allowing Other Processing for more information. The syntax is:

When G2 encounters an allow other processing statement, it first checks to see how long the procedure has been running. If it has been running for more than 200 milliseconds, G2 puts the procedure at the end of the list of tasks with the same priority on the current task queue and proceeds to execute the other tasks on the queue.

If the procedure has not been running for more than 200 milliseconds, G2 continues processing the procedure. Thus G2 will not interrupt the procedure, even if there is an allow other processing statement, if the procedure has not used more than 200 milliseconds of processing time.


Caution: When a procedure returns from a wait state, the environment in which it executes may have changed in ways that invalidate the procedure's assumptions. Be sure to revalidate the environment as needed before continuing execution of the procedure.

| Prev | Next | Start of Chapter | End of Chapter | Contents | Glossary | Index | Comments | (10 out of 25)

Copyright © 1997 Gensym Corporation, Inc.