Re: starpack vfs can't be accessed from thread

[email protected]
Newsgroups gmane.comp.lang.tcl.starkit
Message-ID <010220072248.15624.459AE12D0004011F00003D082207020853089C0E099D0E099C@comcast.net>
 -------------- Original message ----------------------
From: Jeff Hobbs <[email protected]>
> [email protected] 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.