VariablePackage: cgToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.2
Unrevised from 8.1 to 8.2.
8.1 version

*default-cg-message-timeout*

The value of this variable is the number of milliseconds that a Common Graphics thread will wait before timing out with an error when it sends a message to a window that was created in another thread. The default is 3000 (a generous three seconds), but it is still possible for a message timeout to occur if the second thread is busy for longer than this period, because of running code that was triggered by a single event or by a number of events that were all queued up before the first thread sent the message. Many Common Graphics functions internally send messages to the window on which they are invoked or to that window's relatives.

Message timeouts are possible in a generated Common Graphics application only if it starts up additional Common Graphics threads. (By default, an application generated from a project uses only a single thread, without starting up multiprocessing at all.) When multiple Common Graphics threads are used, possible timeouts can still be prevented by not mixing windows that are created in different threads into a single window hierarchy, and not calling code in one thread that accesses windows created in another thread. Timeouts are still possible in the IDE, since it uses multiple Common Graphics threads that sometimes mix windows into a single hierarchy but the likelihood should be very low at the default value of this variable.

If you write an application where message timeouts are possible, you may want to set this variable to a smaller value during development and testing than in your shipped product, to increase the likelihood of catching timeouts that may occur when the shipped product is run on slower or busier machines. If you experience message timeouts in the IDE, you may want to use a larger value than the default.

This special variable is not bound per-thread initially (and thus is not on the *default-cg-bindings* list), so setting its value in any thread will affect all threads. But it may instead be bound in a particular thread to control only the amount of time that that thread will wait when sending a message to a window in any other thread within the dynamic scope of that binding.


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