summaryrefslogtreecommitdiffstats
path: root/tests/thread.test
diff options
context:
space:
mode:
authordkf <dkf@noemail.net>2004-06-18 15:06:42 (GMT)
committerdkf <dkf@noemail.net>2004-06-18 15:06:42 (GMT)
commitdef5f586e91b9d5added6fda603c2bed2e742adf (patch)
treed035ee844304ceb13d6438f2bb63225f64ff7766 /tests/thread.test
parentf15f7387e8cae9935bd7af8d79ad0557f0b1ee35 (diff)
downloadtcl-def5f586e91b9d5added6fda603c2bed2e742adf.zip
tcl-def5f586e91b9d5added6fda603c2bed2e742adf.tar.gz
tcl-def5f586e91b9d5added6fda603c2bed2e742adf.tar.bz2
Added tests for deep-object-freeing
FossilOrigin-Name: 102d5672a6a73447e17afbd212215e9b58091faa
Diffstat (limited to 'tests/thread.test')
-rw-r--r--tests/thread.test19
1 files changed, 18 insertions, 1 deletions
diff --git a/tests/thread.test b/tests/thread.test
index 02bfc71..8e7c471 100644
--- a/tests/thread.test
+++ b/tests/thread.test
@@ -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: thread.test,v 1.12 2004/06/18 14:44:28 dkf Exp $
+# RCS: @(#) $Id: thread.test,v 1.13 2004/06/18 15:06:43 dkf Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -235,6 +235,23 @@ test thread-5.2 {Try to join a detached thread} {testthread} {
lrange $msg 0 2
} {cannot join thread}
+test thread-6.1 {freeing very large object trees in a thread} testthread {
+ # conceptual duplicate of obj-32.1
+ threadReap
+ set serverthread [testthread create -joinable]
+ testthread send -async $serverthread {
+ set x {}
+ for {set i 0} {$i<100000} {incr i} {
+ set x [list $x {}]
+ }
+ unset x
+ testthread exit
+ }
+ catch {set res [testthread join $serverthread]} msg
+ threadReap
+ set res
+} {0}
+
# cleanup
::tcltest::cleanupTests
return