Methods
Circuit methods (MTHDs) are the principal repositories for application processing code. Unlike threads, where control is perceived to persist, circuit methods are scheduled. They execute and return (like GUI call-backs), and in so doing, automatically close their consumed event tree; releasing their interest in consumed resources, in the same manner that conventional functions execute returns and release automatic stack data. Closing the output leaves of the event tree, automatically propagates control to the next processing stage(s), and ensures that sequential functionality is repeatably reproduced; but in this case, in a concurrent processing domain.
Methods should always be used in preference to 'threads' because they provide almost identical functionality (preemptive asynchronous execution) but consume a small fraction of the resources required by conventional threads. They are also load-balanced across entire networks, whilst threads are only scheduled within a single process. See Methods.
Call-backs
GUI call back functions (CBFs) are similar to circuit methods (see below) but are specifically provided as a portable interface between GUI and processing code. This avoids applications being locked-in to the details of particular message pumps such as those provided by Windows QT or MFC. The principal difference between CBFs and MTHDs is that the former execute within the GUI thread, and cannot be re-entered. See Call backs.
Threads
CDL does support the notion of a thread (THRD) , but in practice they are only provided for special cases where applications need to perform external I/O in an iterative manner. Circuit methods make more efficient use of system resources, and since their implementation also avoids the expense of operating system context switching, threads are seldom used in practice. See Threads.