diff options
author | redman <redman@noemail.net> | 1999-07-27 01:42:21 (GMT) |
---|---|---|
committer | redman <redman@noemail.net> | 1999-07-27 01:42:21 (GMT) |
commit | 010e8462f65507648e57204333a18dae2f05c1a8 (patch) | |
tree | 9f2d4d9a9a9b32df258998390716ed7d9de546d0 /win/tclWinPipe.c | |
parent | dff04d84d38df3be5e83e3bfcfe1b283574982d8 (diff) | |
download | tcl-010e8462f65507648e57204333a18dae2f05c1a8.zip tcl-010e8462f65507648e57204333a18dae2f05c1a8.tar.gz tcl-010e8462f65507648e57204333a18dae2f05c1a8.tar.bz2 |
Bug fixes for threaded Tcl on NT with single and dual CPUs. Still some
open issues, this code is a little more stable though.
FossilOrigin-Name: f4fa2a7ba1bdb443e65019bd05fcdd45b1518fd6
Diffstat (limited to 'win/tclWinPipe.c')
-rw-r--r-- | win/tclWinPipe.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/win/tclWinPipe.c b/win/tclWinPipe.c index 6d182fa..565445e 100644 --- a/win/tclWinPipe.c +++ b/win/tclWinPipe.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinPipe.c,v 1.6 1999/05/21 18:28:45 redman Exp $ + * RCS: @(#) $Id: tclWinPipe.c,v 1.7 1999/07/27 01:42:25 redman Exp $ */ #include "tclWinInt.h" @@ -2164,7 +2164,6 @@ PipeClose2Proc( Tcl_MutexLock(&pipeMutex); TerminateThread(pipePtr->readThread, 0); - Tcl_MutexUnlock(&pipeMutex); /* * Wait for the thread to terminate. This ensures that we are @@ -2172,6 +2171,8 @@ PipeClose2Proc( */ WaitForSingleObject(pipePtr->readThread, INFINITE); + Tcl_MutexUnlock(&pipeMutex); + CloseHandle(pipePtr->readThread); CloseHandle(pipePtr->readable); CloseHandle(pipePtr->startReader); @@ -2206,8 +2207,6 @@ PipeClose2Proc( Tcl_MutexLock(&pipeMutex); TerminateThread(pipePtr->writeThread, 0); - Tcl_MutexUnlock(&pipeMutex); - /* * Wait for the thread to terminate. This ensures that we are @@ -2215,6 +2214,9 @@ PipeClose2Proc( */ WaitForSingleObject(pipePtr->writeThread, INFINITE); + Tcl_MutexUnlock(&pipeMutex); + + CloseHandle(pipePtr->writeThread); CloseHandle(pipePtr->writable); CloseHandle(pipePtr->startWriter); |