summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2002-07-09 17:53:53 (GMT)
committerdgp <dgp@users.sourceforge.net>2002-07-09 17:53:53 (GMT)
commit4bc635795e9bf0335e5993887963504e2dd4eba3 (patch)
tree1edace978ebe84f24e57fa29dede9bdbe11a3d65 /tests
parent0ab5803c91ad45c39bb20bd4440d4a2989dbb334 (diff)
downloadtk-4bc635795e9bf0335e5993887963504e2dd4eba3.zip
tk-4bc635795e9bf0335e5993887963504e2dd4eba3.tar.gz
tk-4bc635795e9bf0335e5993887963504e2dd4eba3.tar.bz2
* generic/tkTest.c: Removed unused dependence on TclThread_Init()
* tests/defs.tcl: and [testthread]. [Bug 578165, Tcl Bug 531413]
Diffstat (limited to 'tests')
-rw-r--r--tests/defs.tcl41
1 files changed, 2 insertions, 39 deletions
diff --git a/tests/defs.tcl b/tests/defs.tcl
index 1007465..a25fe46 100644
--- a/tests/defs.tcl
+++ b/tests/defs.tcl
@@ -11,7 +11,7 @@
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
#
-# RCS: @(#) $Id: defs.tcl,v 1.10 2002/06/18 08:24:15 dkf Exp $
+# RCS: @(#) $Id: defs.tcl,v 1.11 2002/07/09 17:53:54 dgp Exp $
# Initialize wish shell
@@ -31,7 +31,7 @@ namespace eval tcltest {
set procList [list test cleanupTests dotests saveState restoreState \
normalizeMsg makeFile removeFile makeDirectory removeDirectory \
viewFile bytestring set_iso8859_1_locale restore_locale \
- safeFetch threadReap]
+ safeFetch]
if {[info exists tk_version]} {
lappend procList setupbg dobg bgReady cleanupbg fixfocus
}
@@ -92,12 +92,6 @@ namespace eval tcltest {
array set ::tcltest::skippedBecause {}
- # tests that use thread need to know which is the main thread
-
- variable ::tcltest::mainThread 1
- if {[info commands testthread] != {}} {
- set ::tcltest::mainThread [testthread names]
- }
}
# If there is no "memory" command (because memory debugging isn't
@@ -1063,37 +1057,6 @@ if {[info exists tk_version]} {
}
}
-# threadReap --
-#
-# Kill all threads except for the main thread.
-# Do nothing if testthread is not defined.
-#
-# Arguments:
-# none.
-#
-# Results:
-# Returns the number of existing threads.
-
-if {[info commands testthread] != {}} {
- proc ::tcltest::threadReap {} {
- testthread errorproc ThreadNullError
- while {[llength [testthread names]] > 1} {
- foreach tid [testthread names] {
- if {$tid != $::tcltest::mainThread} {
- catch {testthread send -async $tid {testthread exit}}
- update
- }
- }
- }
- testthread errorproc ThreadError
- return [llength [testthread names]]
- }
-} else {
- proc ::tcltest::threadReap {} {
- return 1
- }
-}
-
# Need to catch the import because it fails if defs.tcl is sourced
# more than once.