Overview
| Artifact ID: | 9d2f44216528bf54640655eeaabf0e0df150e0b9 |
|---|---|
| Ticket: | 636161ffffffffffffffffffffffffffffffffff
Tcl_FS* problems on windows&threads |
| User & Date: | zoro2 on 2002-11-11 05:41:58 |
Changes
- icomment:
Logged In: YES user_id=191529 I digged a bit more and found out that this problem occured with the vfs package - which is used in TclKit to load itcl.tcl and other modules. The problem is weird, and probably not vfs module related, since it only happens in Tcl_FSEvalFile and only on Windows - using Tcl's open/read/close does not cause any errors at all. It probably sets refCount wrong somewhere in either vfs or Tcl module. A good workaround is to rewrite source to use open/read/close for each thread: proc ::source {file} { if {[catch {set fh [open $file r]; set body [read $fh]; close $fh} rc]} { return -code error -errorinfo $rc -errorcode $::errorCode $rc } set s [info script] info script $file if {[catch {uplevel 1 $body} rc]==1} { info script $s catch {thread::send -async $threadpool::mainthread [list puts $::errorInfo]} return -code error -errorinfo $rc -errorcode $::errorCode $rc } info script $s return $rc } This code slows things down a bit, but it does not require any patches to the core and may prove useful until a real solution is found. - login: "zoro2"
- mimetype: "text/plain"
- priority changed to: "2"
- username: "zoro2"