FunctionPackage: cgToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 9.0
Unrevised from 8.2 to 9.0.
8.2 version

exit-event-loop

Arguments: &key (process multiprocessing:*current-process*) (exit-code 0)

This function provides a way to exit non-locally from an event-handling loop on request. This is an alternative to exiting based on the conditions that were specified when the event-handling loop was first entered.

If the specified process is currently inside a call to event-loop (see inside-event-loop), then this function will post an event (message) to the process that causes it to return from the call to event-loop when the process reads the posted event. If the process is not inside a call to event-loop, then nothing is done.

The process will not exit its call to event-loop until it returns from handling the event that it is currently handling (if any) and it handles any already-queued events. If the process is inside nested calls to event-loop (which would not normally be the case), then only the innermost call is exited for each call to exit-event-loop.

The value of the process keyword argument should be the process to which the message will be posted. The default value is the current process (the value of *current-process*).

The value of the exit-code keyword argument should be a value that will be returned from the call to event-loop. When a standalone Common Graphics application is generated from a project, then typically either the initial process of the application calls event-loop internally (when a window is returned from the on-initialization function) or else the on-initialization function calls event-loop as the last thing that its body does. In either of these cases, the value returned by event-loop will then be returned to the operating system as the application exits. Therefore, this value normally should be an exit code that would make sense to the operating system (when the specified process is the initial one, which would cause the program to exit). The default is zero, which in most operating systems means that the program completed successfully. An application could return other values when it knows that it is exiting due to a failure.


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

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