Tcl Source Code

Hex Artifact Content
Login

Artifact b11d9d25a0c6419fe7fdc4b409562f5385cd8f1c:

Attachment "tclEvent-patch-8.4a3" to ticket [464380ffff] added by rbrunner 2001-09-24 19:08:25.
0000: 2d 2d 2d 20 74 63 6c 45 76 65 6e 74 2e 63 09 4d  --- tclEvent.c.M
0010: 6f 6e 20 53 65 70 20 32 34 20 31 33 3a 33 39 3a  on Sep 24 13:39:
0020: 31 30 20 32 30 30 31 0a 2b 2b 2b 20 74 63 6c 45  10 2001.+++ tclE
0030: 76 65 6e 74 2e 63 09 4d 6f 6e 20 53 65 70 20 32  vent.c.Mon Sep 2
0040: 34 20 31 33 3a 34 39 3a 30 31 20 32 30 30 31 0a  4 13:49:01 2001.
0050: 40 40 20 2d 37 39 35 2c 31 35 20 2b 37 39 35 2c  @@ -795,15 +795,
0060: 36 20 40 40 0a 20 09 54 63 6c 5f 4d 75 74 65 78  6 @@. .Tcl_Mutex
0070: 55 6e 6c 6f 63 6b 28 26 65 78 69 74 4d 75 74 65  Unlock(&exitMute
0080: 78 29 3b 0a 20 0a 20 09 2f 2a 0a 2d 09 20 2a 20  x);. . ./*.-. * 
0090: 43 6c 65 61 6e 20 75 70 20 74 68 65 20 6c 69 62  Clean up the lib
00a0: 72 61 72 79 20 70 61 74 68 20 6e 6f 77 2c 20 62  rary path now, b
00b0: 65 66 6f 72 65 20 77 65 20 69 6e 76 61 6c 69 64  efore we invalid
00c0: 61 74 65 20 74 68 72 65 61 64 2d 6c 6f 63 61 6c  ate thread-local
00d0: 0a 2d 09 20 2a 20 73 74 6f 72 61 67 65 2e 0a 2d  .-. * storage..-
00e0: 09 20 2a 2f 0a 2d 09 69 66 20 28 74 73 64 50 74  . */.-.if (tsdPt
00f0: 72 2d 3e 74 63 6c 4c 69 62 72 61 72 79 50 61 74  r->tclLibraryPat
0100: 68 20 21 3d 20 4e 55 4c 4c 29 20 7b 0a 2d 09 20  h != NULL) {.-. 
0110: 20 20 20 54 63 6c 5f 44 65 63 72 52 65 66 43 6f     Tcl_DecrRefCo
0120: 75 6e 74 28 74 73 64 50 74 72 2d 3e 74 63 6c 4c  unt(tsdPtr->tclL
0130: 69 62 72 61 72 79 50 61 74 68 29 3b 0a 2d 09 20  ibraryPath);.-. 
0140: 20 20 20 74 73 64 50 74 72 2d 3e 74 63 6c 4c 69     tsdPtr->tclLi
0150: 62 72 61 72 79 50 61 74 68 20 3d 20 4e 55 4c 4c  braryPath = NULL
0160: 3b 0a 2d 09 7d 0a 2d 0a 2d 09 2f 2a 0a 20 09 20  ;.-.}.-.-./*. . 
0170: 2a 20 43 6c 65 61 6e 20 75 70 20 61 66 74 65 72  * Clean up after
0180: 20 74 68 65 20 63 75 72 72 65 6e 74 20 74 68 72   the current thr
0190: 65 61 64 20 6e 6f 77 2c 20 61 66 74 65 72 20 65  ead now, after e
01a0: 78 69 74 20 68 61 6e 64 6c 65 72 73 2e 0a 20 09  xit handlers.. .
01b0: 20 2a 20 49 6e 20 70 61 72 74 69 63 75 6c 61 72   * In particular
01c0: 2c 20 74 68 65 20 74 65 73 74 65 78 69 74 68 61  , the testexitha
01d0: 6e 64 6c 65 72 20 63 6f 6d 6d 61 6e 64 20 73 65  ndler command se
01e0: 74 73 20 75 70 20 73 6f 6d 65 74 68 69 6e 67 0a  ts up something.
01f0: 20 09 20 2a 20 74 68 61 74 20 77 72 69 74 65 73   . * that writes
0200: 20 74 6f 20 73 74 61 6e 64 61 72 64 20 6f 75 74   to standard out
0210: 70 75 74 2c 20 77 68 69 63 68 20 67 65 74 73 20  put, which gets 
0220: 63 6c 6f 73 65 64 2e 0a 40 40 20 2d 39 30 37 2c  closed..@@ -907,
0230: 36 20 2b 38 39 38 2c 31 35 20 40 40 0a 20 09 7d  6 +898,15 @@. .}
0240: 0a 20 09 54 63 6c 46 69 6e 61 6c 69 7a 65 49 4f  . .TclFinalizeIO
0250: 53 75 62 73 79 73 74 65 6d 28 29 3b 0a 20 09 54  Subsystem();. .T
0260: 63 6c 46 69 6e 61 6c 69 7a 65 4e 6f 74 69 66 69  clFinalizeNotifi
0270: 65 72 28 29 3b 0a 2b 0a 2b 09 2f 2a 0a 2b 09 20  er();.+.+./*.+. 
0280: 2a 20 43 6c 65 61 6e 20 75 70 20 74 68 65 20 6c  * Clean up the l
0290: 69 62 72 61 72 79 20 70 61 74 68 20 6e 6f 77 2c  ibrary path now,
02a0: 20 62 65 66 6f 72 65 20 77 65 20 69 6e 76 61 6c   before we inval
02b0: 69 64 61 74 65 20 74 68 72 65 61 64 2d 6c 6f 63  idate thread-loc
02c0: 61 6c 0a 2b 09 20 2a 20 73 74 6f 72 61 67 65 2e  al.+. * storage.
02d0: 0a 2b 09 20 2a 2f 0a 2b 09 69 66 20 28 74 73 64  .+. */.+.if (tsd
02e0: 50 74 72 2d 3e 74 63 6c 4c 69 62 72 61 72 79 50  Ptr->tclLibraryP
02f0: 61 74 68 20 21 3d 20 4e 55 4c 4c 29 20 7b 0a 2b  ath != NULL) {.+
0300: 09 20 20 20 20 54 63 6c 5f 44 65 63 72 52 65 66  .    Tcl_DecrRef
0310: 43 6f 75 6e 74 28 74 73 64 50 74 72 2d 3e 74 63  Count(tsdPtr->tc
0320: 6c 4c 69 62 72 61 72 79 50 61 74 68 29 3b 0a 2b  lLibraryPath);.+
0330: 09 20 20 20 20 74 73 64 50 74 72 2d 3e 74 63 6c  .    tsdPtr->tcl
0340: 4c 69 62 72 61 72 79 50 61 74 68 20 3d 20 4e 55  LibraryPath = NU
0350: 4c 4c 3b 0a 2b 09 7d 0a 20 0a 20 09 2f 2a 0a 20  LL;.+.}. . ./*. 
0360: 09 20 2a 20 42 6c 6f 77 20 61 77 61 79 20 61 6c  . * Blow away al
0370: 6c 20 74 68 72 65 61 64 20 6c 6f 63 61 6c 20 73  l thread local s
0380: 74 6f 72 61 67 65 20 62 6c 6f 63 6b 73 2e 0a     torage blocks..