![[index]](../icons/index.gif)
Next: Integration with Threads
Up: MzScheme Architecture
Previous: Library Functions
The intializer function scheme_basic_env creates the main
Scheme thread; all other threads are created through calls to
scheme_thread.
Information about each internal MzScheme thread is kept in a
Scheme_Process structure. A pointer to the current thread's
structure is available as scheme_current_process. A
Scheme_Process structure includes the following fields:
- error_buf -- This is the
mz_jmp_buf value used to escape from errors. The
error_buf value of the current thread is available as
scheme_error_buf.
- cjs.jumping_to_continuation -- This
flag distinguishes escaping-continuation invocations from error
escapes. The cjs.jumping_to_continuation value of the current
thread is available as scheme_jumping_to_continuation.
- config --
The thread's current parameterization. See also section 2.8.
- next -- The next thread in the linked list of threads;
this is NULL for the main thread.
The list of all threads is kept in a linked list;
scheme_first_process points to the first thread in the list.
The last thread in the list is always the main thread.
PLT