VariablePackage: systemToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.1
Object described on page has changed in 8.1. Minimal update since 8.1 release.
8.0 version

*current-thread*

Release 8.1 change note

The functionality associated with this symbol was changed in release 8.1. Previously, this symbol named a variable whose value was the current thread. Now it names a symbol-macro which returns the current thread. Most references to sys:*current-thread* work as they did before (so evaluating it results in the current thread object and forms like (if (eq sys:*current-thread* mythread) ...) work just fine. The main (and backward incompatible) difference is the symbol is not boundp and applying symbol-value to it results in an error.

The symbol sys:*current-thread* names a symbol-macro which when executed returns the current thread. Note, despite being called a "variable", this symbol does not have a value. Evaluating the symbol results in the current thread as a return value, but applying boundp to this symbol returns nil and applying symbol-value to it results in an error. (We call it a "variable" because we do not really have a documentation category that fits it otherwise.)

sys:*current-thread* is implemented as a symbol-macro because doing so is much more efficient, getting the value in just several instructions without even needing, on some platforms, a memory reference.

The distinction between thread and process is arcane, but the most important thing is this:

See also *current-process*. See multiprocessing.htm for more information on multiprocessing.


Copyright (c) 1998-2009, Franz Inc. Oakland, CA., USA. All rights reserved.
Documentation for Allegro CL version 8.1. The object described on this page has been modified in the 8.1 release; see the Release Notes.
Created 2007.4.30.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.1
Object described on page has changed in 8.1. Minimal update since 8.1 release.
8.0 version