Thread Control Overview

When a GPL Project begins execution, its main procedure starts running in a user program "thread." Each thread has its own execution stack and runs independently of all other program and system threads.

The GPL system supports the simultaneous execution of up to 64 GPL user program threads.   These threads allow simultaneous execution of multiple projects.  Even more importantly, a main thread can initiate and control the execution of additional procedures in their own threads.  This is very convenient for the execution of communications servers, digital I/O scanners, and cell control tasks that are best executed asynchronously from the main execution thread.  In general, executing procedures that operate asynchronously in their own threads simplifies the design, coding, and debugging of the procedure.