|
|
|
|
@ -63,9 +63,15 @@ namespace eval zzzload {
|
|
|
|
|
return $ver |
|
|
|
|
} |
|
|
|
|
if {$loader_tid eq ""} { |
|
|
|
|
set loader_tid [thread::create -joinable -preserved] |
|
|
|
|
#todo - set tcl::tm::list and ::auto_path in the loader thread to match the main thread. |
|
|
|
|
#(startup process may have modified these paths) |
|
|
|
|
#propagate tm list, auto_path, and package prefer to the loader thread |
|
|
|
|
#so it can find the same packages as the parent interp. |
|
|
|
|
if {![catch {package require punk::lib}]} { |
|
|
|
|
set init_script [punk::lib::snapshot_package_paths] |
|
|
|
|
set loader_tid [thread::create -joinable -preserved $init_script] |
|
|
|
|
} else { |
|
|
|
|
#punk::lib not available — fall back to bare thread |
|
|
|
|
set loader_tid [thread::create -joinable -preserved] |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if {![tsv::exists zzzload_pkg $pkgname]} { |
|
|
|
|
#puts stderr "zzzload pkg_require $pkgname" |
|
|
|
|
|