home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Practical Programming in Tcl & Tk (4th Edition)
/
TCLBOOK4.BIN
/
pc
/
exsource
/
21_9.tcl
< prev
next >
Wrap
Text File
|
2003-04-16
|
285b
|
23 lines
#
# Example 21-9
# A basic implementation of a logging thread.
#
set logger [::thread::create {
proc OpenLog {file} {
global fid
set fid [open $file a]
}
proc CloseLog {} {
global fid
close $fid
}
proc AddLog {msg} {
global fid
puts $fid $msg
}
::thread::wait
}]