A simple multithreading package. This threading package follows largely the specification of SRFI-18. For more information see the documentation for SRFI-18.
Notes:
The following procedures are provided, in addition to the procedures defined in SRFI-18:
[procedure] (thread-signal! THREAD X)
This will cause THREAD to signal the condition X once it is scheduled for execution. After signalling the condition, the thread continues with its normal execution.
[procedure] (thread-quantum THREAD)
Returns the quantum of THREAD, which is an exact integer specifying the approximate time-slice of the thread in milliseconds.
[procedure] (thread-quantum-set! THREAD QUANTUM)
Sets the quantum of THREAD to QUANTUM.
[procedure] (thread-suspend! THREAD)
Suspends the execution of THREAD until resumed.
[procedure] (thread-resume! THREAD)
Readies the suspended thread THREAD.
[procedure] (thread-wait-for-i/o! FD [MODE])
Suspends the current thread until input (MODE is #:input), output (MODE is #:output) or both (MODE is #:all) is available. FD should be a file-descriptor (not a port!) open for input or output, respectively.
[procedure] (time->milliseconds TIME)
Converts a time object (as created via current-time) into an exact integer representing the number of milliseconds since process startup.
Previous: Unit regex
Next: Unit posix