summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2009-09-03 08:07:07 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2009-09-03 08:07:07 (GMT)
commitbf275faafb5e7f06980740056beb289feda2af67 (patch)
treee42212db43b06b0e1a7a7b8d35abe57d8bae0822 /doc
parent26c688888436fd83e093f6bdb0f200234902d0ee (diff)
downloadtcl-bf275faafb5e7f06980740056beb289feda2af67.zip
tcl-bf275faafb5e7f06980740056beb289feda2af67.tar.gz
tcl-bf275faafb5e7f06980740056beb289feda2af67.tar.bz2
Added suggestions for how to handle the multithreaded case. [Bug 2844962]
Diffstat (limited to 'doc')
-rw-r--r--doc/LinkVar.313
1 files changed, 12 insertions, 1 deletions
diff --git a/doc/LinkVar.3 b/doc/LinkVar.3
index ad6d5f6..5ff0565 100644
--- a/doc/LinkVar.3
+++ b/doc/LinkVar.3
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: LinkVar.3,v 1.17 2008/06/29 22:28:24 dkf Exp $
+'\" RCS: @(#) $Id: LinkVar.3,v 1.18 2009/09/03 08:07:07 dkf Exp $
'\"
.so man.macros
.TH Tcl_LinkVar 3 7.5 Tcl "Tcl Library Procedures"
@@ -194,5 +194,16 @@ Tk widget that wishes to display the value of the variable), the
trace will not trigger when the C variable has changed.
\fBTcl_UpdateLinkedVar\fR ensures that any traces on the Tcl
variable are invoked.
+.PP
+Note that, as with any call to a Tcl interpreter, \fBTcl_UpdateLinkedVar\fR
+must be called from the same thread that created the interpreter. The safest
+mechanism is to ensure that the C variable is only ever updated from the same
+thread that created the interpreter (possibly in response to an event posted
+with \fBTcl_ThreadQueueEvent\fR), but when it is necessary to update the
+variable in a separate thread, it is advised that \fBTcl_AsyncMark\fR be used
+to indicate to the thread hosting the interpreter that it is ready to run
+\fBTcl_UpdateLinkedVar\fR.
+.SH "SEE ALSO"
+Tcl_TraceVar(3)
.SH KEYWORDS
boolean, integer, link, read-only, real, string, traces, variable