diff options
Diffstat (limited to 'doc/Async.3')
| -rw-r--r-- | doc/Async.3 | 41 |
1 files changed, 14 insertions, 27 deletions
diff --git a/doc/Async.3 b/doc/Async.3 index e6ec5f8..d7a5147 100644 --- a/doc/Async.3 +++ b/doc/Async.3 @@ -4,12 +4,12 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH Tcl_AsyncCreate 3 7.0 Tcl "Tcl Library Procedures" .so man.macros .BS .SH NAME -Tcl_AsyncCreate, Tcl_AsyncMark, Tcl_AsyncMarkFromSignal, Tcl_AsyncInvoke, Tcl_AsyncDelete, Tcl_AsyncReady \- handle asynchronous events +Tcl_AsyncCreate, Tcl_AsyncMark, Tcl_AsyncInvoke, Tcl_AsyncDelete, Tcl_AsyncReady \- handle asynchronous events .SH SYNOPSIS .nf \fB#include <tcl.h>\fR @@ -17,16 +17,11 @@ Tcl_AsyncCreate, Tcl_AsyncMark, Tcl_AsyncMarkFromSignal, Tcl_AsyncInvoke, Tcl_As Tcl_AsyncHandler \fBTcl_AsyncCreate\fR(\fIproc, clientData\fR) .sp -void \fBTcl_AsyncMark\fR(\fIasync\fR) .sp int -\fBTcl_AsyncMarkFromSignal\fR(\fIasync\fR, \fIsigNumber\fR) -.sp -int \fBTcl_AsyncInvoke\fR(\fIinterp, code\fR) .sp -void \fBTcl_AsyncDelete\fR(\fIasync\fR) .sp int @@ -39,8 +34,6 @@ Procedure to invoke to handle an asynchronous event. One-word value to pass to \fIproc\fR. .AP Tcl_AsyncHandler async in Token for asynchronous event handler. -.AP int sigNumber in -POSIX signal number, when used in a signal context. .AP Tcl_Interp *interp in Tcl interpreter in which command was being evaluated when handler was invoked, or NULL if handler was invoked when there was no interpreter @@ -67,11 +60,10 @@ to a clean state, such as after the current Tcl command completes. .PP \fBTcl_AsyncCreate\fR, \fBTcl_AsyncDelete\fR, and \fBTcl_AsyncReady\fR are thread sensitive. They access and/or set a thread-specific data -structure in the event of a core built with \fI\-\-enable\-threads\fR. -The token created by \fBTcl_AsyncCreate\fR contains the needed thread -information it was called from so that calling \fBTcl_AsyncMarkFromSignal\fR -or \fBTcl_AsyncMark\fR with this token will only yield the origin -thread into the asynchronous handler. +structure in the event of a core built with \fI\-\-enable\-threads\fR. The token +created by \fBTcl_AsyncCreate\fR contains the needed thread information it +was called from so that calling \fBTcl_AsyncMark\fR(\fItoken\fR) will only yield +the origin thread into the asynchronous handler. .PP \fBTcl_AsyncCreate\fR creates an asynchronous handler and returns a token for it. @@ -80,26 +72,21 @@ any occurrences of the asynchronous event that it is intended to handle (it is not safe to create a handler at the time of an event). When an asynchronous event occurs the code that detects the event -(such as a POSIX signal handler) should call \fBTcl_AsyncMarkFromSignal\fR -with the token for the handler and the POSIX signal number. The -return value of this function is true, when the handler will be -marked, false otherwise. -For non-signal contexts, \fBTcl_AsyncMark\fR serves the same purpose. -\fBTcl_AsyncMarkFromSignal\fR and \fBTcl_AsyncMark\fR will mark -the handler as ready to execute, but will not invoke the handler -immediately. Tcl will call the \fIproc\fR associated with the -handler later, when the world is in a safe state, and \fIproc\fR -can then carry out the actions associated with the asynchronous event. +(such as a signal handler) should call \fBTcl_AsyncMark\fR with the +token for the handler. +\fBTcl_AsyncMark\fR will mark the handler as ready to execute, but it +will not invoke the handler immediately. +Tcl will call the \fIproc\fR associated with the handler later, when +the world is in a safe state, and \fIproc\fR can then carry out +the actions associated with the asynchronous event. \fIProc\fR should have arguments and result that match the type \fBTcl_AsyncProc\fR: -.PP .CS -typedef int \fBTcl_AsyncProc\fR( +typedef int Tcl_AsyncProc( ClientData \fIclientData\fR, Tcl_Interp *\fIinterp\fR, int \fIcode\fR); .CE -.PP The \fIclientData\fR will be the same as the \fIclientData\fR argument passed to \fBTcl_AsyncCreate\fR when the handler was created. |
