⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dead002.tcl

📁 这是linux下运行的mysql软件包,可用于linux 下安装 php + mysql + apach 的网络配置
💻 TCL
字号:
# See the file LICENSE for redistribution information.## Copyright (c) 1996-2002#	Sleepycat Software.  All rights reserved.## $Id: dead002.tcl,v 11.23 2002/09/05 17:23:05 sandstro Exp $## TEST	dead002# TEST	Same test as dead001, but use "detect on every collision" instead# TEST	of separate deadlock detector.proc dead002 { { procs "2 4 10" } {tests "ring clump" } \    {timeout 0} {tnum 002} } {	source ./include.tcl	puts "Dead$tnum: Deadlock detector tests"	env_cleanup $testdir	# Create the environment.	puts "\tDead$tnum.a: creating environment"	set lmode "default"	if { $timeout != 0 } {		set lmode "expire"	}	set env [berkdb_env \	    -create -mode 0644 -home $testdir \	    -lock -txn_timeout $timeout -lock_detect $lmode]	error_check_good lock_env:open [is_valid_env $env] TRUE	foreach t $tests {		foreach n $procs {			set pidlist ""			sentinel_init			# Fire off the tests			puts "\tDead$tnum: $n procs of test $t"			for { set i 0 } { $i < $n } { incr i } {				set locker [$env lock_id]				puts "$tclsh_path $test_path/wrap.tcl \				    $testdir/dead$tnum.log.$i \				    ddscript.tcl $testdir $t $locker $i $n"				set p [exec $tclsh_path \					$test_path/wrap.tcl \					ddscript.tcl $testdir/dead$tnum.log.$i \					$testdir $t $locker $i $n &]				lappend pidlist $p			}			watch_procs $pidlist 5			# Now check output			set dead 0			set clean 0			set other 0			for { set i 0 } { $i < $n } { incr i } {				set did [open $testdir/dead$tnum.log.$i]				while { [gets $did val] != -1 } {					switch $val {						DEADLOCK { incr dead }						1 { incr clean }						default { incr other }					}				}				close $did			}			dead_check $t $n $timeout $dead $clean $other		}	}	fileremove -f $testdir/dd.out	# Remove log files	for { set i 0 } { $i < $n } { incr i } {		fileremove -f $testdir/dead$tnum.log.$i	}	error_check_good lock_env:close [$env close] 0}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -