[Starkit] starpack vfs can't be accessed from thread

sgargash at comcast.net sgargash at comcast.net
Tue Jan 2 22:48:13 CET 2007


 -------------- Original message ----------------------
From: Jeff Hobbs <jeffh at activestate.com>
> sgargash at comcast.net wrote:
> > When using the most recent ActiveState release (8.4.14) on Windows, I
> > can no longer access files in a VFS from a child thread.
> 	...
> > I saw in an older comp.lang.tcl thread that there were thread safety
> > issues in the vfs code, but that this had been fixed.   Is there now
> > something new that needs to be done to allow the child thread access
> > to the VFS?
> 
> It is correct that you shouldn't be able to access VFS mount points 
> between threads by design.  That you could lead to horrible thread 
> safety issues (*very* easy crash conditions).  A VFS mount point should 
> be considered per thread.  If you need it in multiple threads, mount it 
> per thread.

Hmm...but the child thread can't mount the vfs since (I believe) the vfs package is located in the vfs that it can't access.

1 % set t [thread::create {thread::wait}]
tid00000304
2 % thread::send $t {package require vfs}
can't find package vfs
3 % thread::send $t {package names}
Thread tclkitpath registry dde zlib Mk4tcl Tcl

Is there some additional voodoo necessary to expose the vfs package to the child thread?

    Scott


More information about the Starkit mailing list