#3614 Threads can't access vfs from starpack

obsolete: 8.4.14
closed-fixed
Vince Darley
5
2014-10-01
2007-01-05
Anonymous
No

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]"

Discussion

    • labels: 104253 --> 37. File System
    • assigned_to: nobody --> vincentdarley
     
  • Jeffrey Hobbs
    Jeffrey Hobbs
    2007-02-09

    Logged In: YES
    user_id=72656
    Originator: NO

    Fixed in boot.tcl of starpacks.

     
  • Jeffrey Hobbs
    Jeffrey Hobbs
    2007-02-09

    • status: open --> closed-fixed