update − Process pending events and idle callbacks


update ?idletasks? ___________________________


This command is used to bring the application “up to date” by entering the event loop repeatedly until all pending events (including idle callbacks) have been processed.

If the idletasks keyword is specified as an argument to the command, then no new events or errors are processed; only idle callbacks are invoked. This causes operations that are normally deferred, such as display updates and window layout calculations, to be performed immediately.

The update idletasks command is useful in scripts where changes have been made to the application’s state and you want those changes to appear on the display immediately, rather than waiting for the script to complete. Most display updates are performed as idle callbacks, so update idletasks will cause them to run. However, there are some kinds of updates that only happen in response to events, such as those triggered by window size changes; these updates will not occur in update idletasks.

The update command with no options is useful in scripts where you are performing a long-running computation but you still want the application to respond to events such as user interactions; if you occasionally call update then user input will be processed during the next call to update.


Run computations for about a second and then finish:

set x 1000
set done 0
after 1000 set done 1
while {!$done} {
# A very silly example!
set x [expr {log($x) ** 2.8}]

# Test to see if our time-limit has been hit. This would
# also give a chance for serving network sockets and, if
# the Tk package is loaded, updating a user interface.



after(n), interp(n)


asynchronous I/O, event, flush, handler, idle, update

More Linux Commands

XdbeAllocateBackBufferName(3) - allocates a DBE buffer......
This function returns a drawable ID used to refer to the back buffer of the specified window. The swap_action is a hint to indicate the swap action that will li

acoshl(3) - inverse hyperbolic cosine function (Man Page)...
The acosh() function calculates the inverse hyperbolic cosine of x; that is the value whose hyperbolic cosine is x. RETURN VALUE On success, these functions ret

mysqlcheck(1) - a table maintenance program - Linux man page
The mysqlcheck client performs table maintenance: It checks, repairs, optimizes, or analyzes tables. Each table is locked and therefore unavailable to other ses

XML::Handler::Subs(3pm) - a PerlSAX handler base class for c
XML::Handler::Subs is a base class for PerlSAX handlers. XML::Handler::Subs is subclassed to implement complete behavior and to add element-specific handling. E

zgrep(1) - search possibly compressed files for a regular ex
Zgrep invokes grep on compressed, xzed, lzmaed, bzip2ed or gzipped files. All options specified are passed directly to grep. If no file is specified, then the s

pam_shells(8) - PAM module to check for valid login shell...
pam_shells is a PAM module that only allows access to the system if the users shell is listed in /etc/shells. It also checks if /etc/shells is a plain file and

glPixelTransferi(3gl) - set pixel transfer modes (Man Page)
glPixelTransfer sets pixel transfer modes that affect the operation of subsequent glCopyPixels, glCopyTexImage1D, glCopyTexImage2D, glCopyTexSubImage1D, glCopyT

LastKnownRequestProcessed(3) - Display macros and functions
LastKnownRequestProcessed.3 - The AllPlanes macro returns a value with all bits set to 1 suitable for use in a plane argument to a procedure. The BlackPixel mac

xmode2(1) - shows the pulse/space length of infrared signals
xmode2.1 - The main purpose of these programs is to check operation of your home-brew LIRC receiver hardware and to see the IR waveform of the remote controller

Xutf8DrawText(3) - draw text using multiple font sets.......
The XmbDrawText, XwcDrawText and Xutf8DrawText functions allow complex spacing and font set shifts between text strings. Each text item is processed in turn, wi

pam_limits(8) - PAM module to limit resources (Man Page)....
The pam_limits PAM module sets limits on the system resources that can be obtained in a user-session. Users of uid=0 are affected by this limits, too. By defaul

snmptable(1) - retrieve an SNMP table and display it in tabu
snmptable is an SNMP application that repeatedly uses the SNMP GETNEXT or GETBULK requests to query for information on a network entity. The parameter TABLE-OID

We can't live, work or learn in freedom unless the software we use is free.