diff options
author | andreas_kupries <andreas_kupries@noemail.net> | 2001-03-30 23:06:38 (GMT) |
---|---|---|
committer | andreas_kupries <andreas_kupries@noemail.net> | 2001-03-30 23:06:38 (GMT) |
commit | 3f062132bcb7412026a455fbcb1bea40605c2563 (patch) | |
tree | 54aac1cde138798340a664ebb66533625a892063 /generic/tclIO.h | |
parent | 3aa71e72ce989c93766d4a675cf7fb077b368c29 (diff) | |
download | tcl-3f062132bcb7412026a455fbcb1bea40605c2563.zip tcl-3f062132bcb7412026a455fbcb1bea40605c2563.tar.gz tcl-3f062132bcb7412026a455fbcb1bea40605c2563.tar.bz2 |
2001-03-30 Andreas Kupries <andreas_kupries@users.sourceforge.net>
* All of the changes below belong to TIP #10 [Tcl I/O Enhancement:
Thread-Aware Channels]. See also [Patch #403358] at SF.
* generic/tclIO.h (struct ChannelState, line 236f): Extended the
structure with a new field of type 'Tcl_ThreadId' to hold the id
of the thread currently managing all channels with this state.
Note: This structure is shared by all channels in a stack of
transformations.
* generic/tclIO.c (Tcl_CreateChannel, lines 1058-1065): Modified
to store the Id of the current thread in the 'ChannelState' of
the new channel.
* generic/tclIO.c (Tcl_SpliceChannel, lines 2265-2270): Modified
in the same manner as 'Tcl_CreateChannel' as the channel will be
managed by the current thread afterward.
* generic/tclIO.c (Tcl_GetChannelThread, lines 1478-1503):
* generic/tcl.decls (Tcl_GetChannelThread, lines 1504-1506): New
API function to retrieve the Id of the managing thread from a
channel. Implementation and declaration.
* generic/tclTest.c (TestChannelCmd, lines 4520-4532): Added
subcommand 'mthread' to query a channel about its managing
thread.
FossilOrigin-Name: 902eab8ec8e95ce2acde8110fda3321c5e487336
Diffstat (limited to 'generic/tclIO.h')
-rw-r--r-- | generic/tclIO.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/generic/tclIO.h b/generic/tclIO.h index b232cba..caac702 100644 --- a/generic/tclIO.h +++ b/generic/tclIO.h @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIO.h,v 1.2 2000/09/28 06:38:21 hobbs Exp $ + * RCS: @(#) $Id: tclIO.h,v 1.3 2001/03/30 23:06:40 andreas_kupries Exp $ */ /* @@ -233,6 +233,8 @@ typedef struct ChannelState { * long as the channel state. Never NULL. */ struct ChannelState *nextCSPtr; /* Next in list of channels currently open. */ + Tcl_ThreadId managingThread; /* TIP #10: Id of the thread managing + * this stack of channels. */ } ChannelState; /* |