MacroPackage: mpToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.1
Unrevised from 10.0 to 10.1.
10.0 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-2022, Franz Inc. Lafayette, CA., USA. All rights reserved.
This page was not revised from the 10.0 page.
Created 2019.8.20.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.1
Unrevised from 10.0 to 10.1.
10.0 version