MacroPackage: mpToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.2
Unrevised from 8.1 to 8.2.
8.1 version

with-message-interrupts-disabled

Arguments: &body body

Executes the forms of body as a progn inside an environment that has disabled message interrupt processing for this process. The form returns the value or values returned by the last form in the body.

The MS Windows operating system sometimes sends messages to threads and requires a timely response. Failure to respond can degrade system performance or even cause a deadlock.

Because of this, Allegro CL processes (threads) running on a Windows host will watch for messages, even when they are sleeping or are non-dispatchable because of arrest or run reasons. When a message arrives while the process is sleeping, the process's message-interrupt-function (see process-message-interrupt-function) is called as if by a process-interrupt. After the message-interrupt-function returns, the wait state is reentered.

This is the normal state of things, and usually does all that is needed. However, if some function processing a windows message should sleep or otherwise wait, it becomes possible for the message-interrupt-function to get invoked and process the next message before the current message has been fully processed. This can cause serious problems.

The mp:with-message-interrupts-disabled macro allows message-handling code to wait or sleep without risking out-of-sequence message processing.

See multiprocessing.htm for general information on multiprocessing.


Copyright (c) 1998-2016, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 8.1 page.
Created 2010.1.21.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.2
Unrevised from 8.1 to 8.2.
8.1 version