## 6.19 Unit: srfi-18

A simple multithreading package. This threading package follows largely the specification of SRFI-18. For more information see the documentation for SRFI-18 22

Notes:

- Blocking I/O will block all threads, except for some socket operations (see the section about the `tcp` unit).

- It is generally not a good idea for one thread to call a continuation created by another thread, if `dynamic-wind` is involved.

- When more than one thread compete for the current time-slice, the thread that was waiting first will become the next runnable thread.

- The dynamic environment of a thread consists of the following state:

  - The current input-, output- and error-port

  - The current exception handler

  - The values of all current parameters (created by `make-parameter`)

  - Any pending `dynamic-wind` thunks.

[procedure] (thread-quantum THREAD)
  Returns the quantum of `THREAD`, which is an exact integer specifying the approximate time-slice of the thread.

[procedure] (thread-quantum-set! THREAD QUANTUM)
  Sets the quantum of `THREAD` to `QUANTUM`.

22 http://srfi.schemers.org/srfi-18/srfi-18.html