Next: srfi.227 - Optional arguments, Previous: srfi.222 - Compound objects, Up: Library modules - SRFIs [Contents][Index]
srfi.226 - Control featuresThis srfi enhances the semantics of Scheme’s fundamental concepts
such as continuations and dynamic environments, to support multi-threaded
programs and delimited continuations. Some R7RS primitives such as
call/cc and dynamic-wind are extended
to be consistent with the enhanced execution model.
The thread API is mostly compatible with SRFI-18, and so as with
Gauche’s thread API (see gauche.threads - Threads).
Since the enhanced features are tightly coupled with runtime, most APIs in this srfi is implemented as built-ins in Gauche. This section gives you the overview of SRFI-226 APIs and pointers to the documents.
In 0.9.13, Gauche only implements part of SRFI-226. We’ll cover its entirety in future releases.
SRFI-226 is an upward compatible extension of R7RS. However, Gauche has also
extended R7RS control features in regards of multi-threaded
programs, and there are subtle incompatibilites. We’ll move to
full SRFI-226 compatibility, but we also provide backward-compatible
interface. If you use srfi.226, you’ll get SRFI-226
behavior.
Here’s a list of SRFI-226 APIs and how Gauche supports them.
&continuationmake-continuation-violationcontinuation-violation?continuation-violation-prompt-tagSee Conditions
make-continuation-prompt-tagdefault-continuation-prompt-tagcontinuation-prompt-tag?call-with-continuation-promptabort-current-continuationSee Continuation prompts.
call-with-non-comosable-continuationcall-with-composable-continuationNot implemented yet.
call-with-current-continuationcall/ccSee Continuations.
call-in-continuationcall-inNot implemented yet.
call-with-continuation-barrierNot implemented yet.
continuation-prompt-available?Not implemented yet.
dynamic-windSee Continuations.
unwind-protectshift-atreset-atNot implemented yet.
shiftresetSee gauche.partcont - Partial continuations. However, current implementation
of shift/reset hasn’t integrated to SRFI-226 model
yet.
continuation?non-composable-continuation?Not implemented yet.
with-continuation-markwith-continuation-markscall-with-immediate-continuation-markcontinuation-markscurrent-continuation-markscontinuation-mark-set?continuation-mark-set->listcontinuation-mark-set-firstSee Continuation marks.
continuation-mark-set->list*continuation-mark-set->iteratorNot implemented yet.
make-continuation-mark-keycontinuation-mark-key?See Continuation marks.
make-parametermake-thread-parameterSee Parameters. Gauche’s built-in make-parameter works
in a compatibility mode for now. If you use srfi.226,
make-parameter works as specified in SRFI-226.
parameter?See Parameters.
parameterizeSee Parameters. Gauche’s built-in parameterize works
in a compatibility mode for now. If you use srfi.226,
make-parameter works as specified in SRFI-226.
current-parameterizationparameterization?call-with-parameterizationSee Parameters.
temporarilySee Dynamic states.
define-fluiddefine-thread-fluiddefine-fluidifiedfluid-letfluid-let*fluid-parameterNot implemented yet.
call-with-initial-continuationNot implemented yet.
delaypromise?forcemake-promiseSee Delay, force and lazy. Gauche’s built-ins are SRFI-226 compatible.
with-exception-handlercurrent-exception-handlerexception-handler-stackSee Low-level exception handling mechanism. Gauche’s built-ins are SRFI-226 compatible.
raiseraise-continuableSee Signaling exceptions.
guard¶meterizationmake-parameterization-conditionparameterization-condition?condition-parameterizationNot implemented yet.
&continuation-marksmake-continuation-marks-conditioncontinuation-marks-condition?condition-continuation-marksNot implemented yet.
&exception-handler-stackmake-exception-handler-stack-conditionexception-handler-stack-condition?condition-exception-handler-stackNot implemented yet.
time?current-timeseconds+ timeSee Time.
&threadmake-thread-conditionthread-condition?&uncaught-exceptionmake-uncaught-exceptionuncaught-exception-condition?uncaught-exception-condition-reason&thread-already-terminatedmake-thread-already-terminated-conditionthread-already-terminated-condition?&thread-timeoutmake-thread-timeout-conditionthread-timeout-condition?&thread-abandoned-mutexmake-thread-abandoned-mutex-conditionthread-abandoned-mutex-condition?&concurrent-modificationmake-concurrent-modification-violationconcurrent-modification-violation?See Thread exceptions.
make-threadthread?current-threadthread-start!thread-yield!thread-sleep!thread-terminate!thread-schedule-terminate!thread-join!make-mutexmutex?mutex-statemutex-lock!mutex-unlock!See Mutex.
make-condition-variablecondition-variable?condition-variable-signal!condition-variable-broadcast!See Condition variable.
make-thread-localthread-local?tlreftlset!See Thread local storage.
current-interrupt-leveldisable-interrupts!enable-interrupts!with-interrupts-disabledwith-interrupts-enabledthread-interrupt!Not implemented yet.
Next: srfi.227 - Optional arguments, Previous: srfi.222 - Compound objects, Up: Library modules - SRFIs [Contents][Index]