[previous] [up] [next]     [contents] [index]
Next: Eventspaces and User Breaks Up: Eventspaces Previous: Creating and Setting the

Eventspace Parameterizations

A parameterization is a collection of parameter values used by a thread. (See MzScheme Reference Manual for more information about parameterizations.) Each eventspace has its own parameterization that is used for handler threads. Each new handler thread's parameterization is initially set to the eventspace's parameterization, so that changes to the parameterization are visible across the handling of different events.

A handler thread can change its own parameterization, but if the thread is re-used to handle another event, the thread's parameterization is changed back to the eventspace parameterization. When a handler thread processes a nested event, its parameterization is reset to the eventspace parameterization, but then restored to the pre-nested state when the nested event is handled.

The parameterization for a given eventspace can be obtained with wx:eventspace-parameterization. Note that the wx:current-eventspace parameter value of an eventspace's parameterization is not required to be the eventspace itself, although an eventspace's parameterization is initially configured this way.

When a new eventspace is created, the parameterization for the new eventspace can be specified as an argument to wx:make-eventspace. When wx:make-eventspace is called with no arguments, then a parameterization is obtained from the current paramaterization branch handler (as determined by the parameterization-branch-handler parameter). In this case, the wx:current-eventspace parameter of the returned parameterization is set to the newly-created eventspace.



PLT