Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2007-02-09
07:56 • Closed ticket [1628986fff]: Threads can't access vfs from starpack plus ... artifact: f780e88dfd user: hobbs
2007-01-18
18:50 • Ticket [1628986fff]: 2 changes artifact: 3cb5a3bc45 user: dkf
2007-01-05
18:42 • New ticket [1628986fff]. artifact: 328787b43a user: nobody

Threads can't access vfs from starpack

Closed / Fixed1628986fffffffffffffffffffffffffffffffffCreated 20 years agoUpdated 20 years ago
Descriptionplain2007-01-05 18:42:44
As of 8.4.14, there is a chicken-and-egg problem with threads and the starpack vfs. 

Threads now must explicitly mount any vfs's that they wish to use, as the mounts are no longer implicilty shared.  In  order for a thread to mount a vfs, it must package require the appropriate vfs package.  However in the case of a starpack, the package needed to mount the starpack's vfs (vfs::mk4) is in the starpack itself.  

The following files built into a starpack demonstrate the problem.

=======
file: test.vfs/main.tcl

package require starkit
starkit::startup

package require Thread

set foo [file join [info nameofexecutable] foo.tcl]
 
source $foo

set t [thread::create {thread::wait}]

# thread::send $t { #what goes here to give the thread access foo.tcl located in the starpack's vfs" }
thread::send $t [list source $foo]

=======
file: test.vfs/foo.tcl

puts "hello world from [thread::id]"
dkf Ticket [1628986fff]: 2 changes [History diff]2007-01-18 18:50:09
hobbsplain2007-02-09 07:56:50
Logged In: YES 
user_id=72656
Originator: NO

Fixed in boot.tcl of starpacks.
Log in (anonymous is fine) to add a comment.