A work procedure is a function that is called when Xt has no other events to process. Work procedures are, therefore, a convenient means of setting up a background batch process without interfering with events from the X server. One common use of work procedures is in program initialization. There are often many widgets which need to be created when an application is started. Since this is a time-consuming process, using work procedures allows the application to respond to user actions almost immediately.
Work procedures should return True or False. A value of True indicates to the X toolkit that your procedure should be removed from the work queue once executed. False indicates that it should be called again the next time the queue is empty of user events. You can have any number of work procedures registered at any time.
To add a work procedure, select "Work Procedures..." from the Module menu.
See also: