|
1 | 1 | '\" |
2 | 2 | '\" Generated from file '' by tcllib/doctools with format 'nroff' |
3 | 3 | '\" |
4 | | -.TH "thread" n 2\&.8 "Tcl Threading" |
| 4 | +.TH "thread" n 3\&.0 "Tcl Threading" |
5 | 5 | .\" The -*- nroff -*- definitions below are for supplemental macros used |
6 | 6 | .\" in Tcl/Tk manual entries. |
7 | 7 | .\" |
@@ -273,9 +273,9 @@ Database Class: \\fB\\$3\\fR |
273 | 273 | .SH NAME |
274 | 274 | thread \- Extension for script access to Tcl threading |
275 | 275 | .SH SYNOPSIS |
276 | | -package require \fBTcl 8\&.5\fR |
| 276 | +package require \fBTcl 9\&.0\fR |
277 | 277 | .sp |
278 | | -package require \fBthread ?2\&.9?\fR |
| 278 | +package require \fBthread ?3\&.0?\fR |
279 | 279 | .sp |
280 | 280 | \fBthread::create\fR ?-joinable? ?-preserved? ?script? |
281 | 281 | .sp |
@@ -362,10 +362,8 @@ and sending scripts to threads for evaluation\&. |
362 | 362 | This command creates a thread that contains a Tcl interpreter\&. |
363 | 363 | The Tcl interpreter either evaluates the optional \fBscript\fR, if |
364 | 364 | specified, or it waits in the event loop for scripts that arrive via |
365 | | -the \fBthread::send\fR command\&. Both of them would take place simultaneously |
366 | | -with the return of command \fBthread::create\fR to the caller thread\&. |
367 | | -Neither the caller is waiting for the finishing of optional \fBscript\fR, |
368 | | -nor the result, if any, of the \fBscript\fR is returned to the caller\&. |
| 365 | +the \fBthread::send\fR command\&. The result, if any, of the |
| 366 | +optional \fBscript\fR is never returned to the caller\&. |
369 | 367 | The result of \fBthread::create\fR is the ID of the thread\&. This is |
370 | 368 | the opaque handle which identifies the newly created thread for |
371 | 369 | all other package commands\&. The handle of the thread goes out of scope |
@@ -589,6 +587,13 @@ thus being executed in the LIFO fashion\&. |
589 | 587 | This command passes a \fIscript\fR to all threads created by the |
590 | 588 | package for execution\&. It does not wait for response from any of |
591 | 589 | the threads\&. |
| 590 | +.sp |
| 591 | +The sending thread (the one executing the thread::broadcast command) does |
| 592 | +not send the script to itself\&. |
| 593 | +.sp |
| 594 | +Each receiving thread is directed to place evaluation of the send script |
| 595 | +at the head of its event queue, stepping in front of any other events |
| 596 | +awaiting processing\&. |
592 | 597 | .TP |
593 | 598 | \fBthread::wait\fR |
594 | 599 | This enters the event loop so a thread can receive messages from |
@@ -861,3 +866,4 @@ is also supported\&. |
861 | 866 | \fIhttp://www\&.tcl\&.tk/doc/howto/thread_model\&.html\fR, tpool, tsv, ttrace |
862 | 867 | .SH KEYWORDS |
863 | 868 | events, message passing, mutex, synchronization, thread |
| 869 | + |
0 commit comments