diff options
Diffstat (limited to 'doc/update.n')
| -rw-r--r-- | doc/update.n | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/doc/update.n b/doc/update.n index 522b176..875172a 100644 --- a/doc/update.n +++ b/doc/update.n @@ -5,10 +5,8 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" SCCS: @(#) update.n 1.3 96/03/25 20:26:34 -'\" -.so man.macros .TH update n 7.5 Tcl "Tcl Built-In Commands" +.so man.macros .BS '\" Note: do not modify the .SH NAME line immediately below! .SH NAME @@ -16,11 +14,11 @@ update \- Process pending events and idle callbacks .SH SYNOPSIS \fBupdate\fR ?\fBidletasks\fR? .BE - .SH DESCRIPTION .PP -This command is used to bring the application ``up to date'' -by entering the event loop repeated until all pending events +This command is used to bring the application +.QW "up to date" +by entering the event loop repeatedly until all pending events (including idle callbacks) have been processed. .PP If the \fBidletasks\fR keyword is specified as an argument to the @@ -43,6 +41,25 @@ 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 \fBupdate\fR then user input will be processed during the next call to \fBupdate\fR. +.SH EXAMPLE +.PP +Run computations for about a second and then finish: +.PP +.CS +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. + \fBupdate\fR +} +.CE +.SH "SEE ALSO" +after(n), interp(n) .SH KEYWORDS -event, flush, handler, idle, update +asynchronous I/O, event, flush, handler, idle, update |
