Re: Re: starkit-lite and threads: can't package require

Hermann Boeken <[email protected]> Wed, 29 Aug 2012 02:19:12 -0700 (PDT)
Newsgroups gmane.comp.lang.tcl.starkit
Message-ID <[email protected]>
------=_Part_1340_30308418.1346231952748
Content-Type: text/plain; charset=ISO-8859-1

Hello Uwe,

I tried your solution and it looks promising.
A first test was successful. 

Thanks for sharing your solution,
Hermann

Am Samstag, 25. August 2012 02:12:56 UTC+2 schrieb Uwe Koloska:
>
> Hello Hermann, 
>
> Am Dienstag, 21. August 2012 schrieb Hermann Boeken: 
> > have you ever found the solution to this problem? 
>
> At least I have found something that works for my app -- YMMV! 
>
> > I have a similar problem here. 
> > I want to package a threaded application as starpack, but none of my 
> > threads have access to the Tcl packages within the app's vfs then. 
>
> Here is my version of the thread init-function that does the trick for me: 
>
> #+BEGIN_SRC Tcl 
> package require Thread 
> proc threadvfs {} { 
>     if {[info exists starkit::mode] && $starkit::mode ne "unwrapped"} { 
>         set self $starkit::topdir 
>         append data "vfs::mk4::Mount \"$self\" \"$self\" -readonly\n" 
>     } 
>     append data "set ::auto_path [list $::auto_path]\n" 
>     append data "thread::wait" 
>
>     return [thread::create $data] 
> } 
> #+END_SRC 
>
> Hope this helps 
> Uwe 
>

-- 
You received this message because you are subscribed to the "starkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/starkit?hl=en
------=_Part_1340_30308418.1346231952748
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Hello Uwe,<br><br>I tried your solution and it looks promising.<br>A first =
test was successful. <br><br>Thanks for sharing your solution,<br>Hermann<b=
r><br>Am Samstag, 25. August 2012 02:12:56 UTC+2 schrieb Uwe Koloska:<block=
quote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-le=
ft: 1px #ccc solid;padding-left: 1ex;">Hello Hermann,
<br>
<br>Am Dienstag, 21. August 2012 schrieb Hermann Boeken:
<br>&gt; have you ever found the solution to this problem?
<br>
<br>At least I have found something that works for my app -- YMMV!
<br>
<br>&gt; I have a similar problem here.
<br>&gt; I want to package a threaded application as starpack, but none of =
my
<br>&gt; threads have access to the Tcl packages within the app's vfs then.
<br>
<br>Here is my version of the thread init-function that does the trick for =
me:
<br>
<br>#+BEGIN_SRC Tcl
<br>package require Thread
<br>proc threadvfs {} {
<br>&nbsp; &nbsp; if {[info exists starkit::mode] &amp;&amp; $starkit::mode=
 ne "unwrapped"} {
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;set self $starkit::topd=
ir
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;append data "vfs::mk4::=
Mount \"$self\" \"$self\" -readonly\n"
<br>&nbsp; &nbsp; }
<br>&nbsp; &nbsp; append data "set ::auto_path [list $::auto_path]\n"
<br>&nbsp; &nbsp; append data "thread::wait"
<br>
<br>&nbsp; &nbsp; return [thread::create $data]
<br>}
<br>#+END_SRC
<br>
<br>Hope this helps
<br>Uwe
<br></blockquote>

<p></p>

-- <br />
You received this message because you are subscribed to the &quot;starkit&q=
uot; group.<br />
To post to this group, send email to [email protected]<br />
To unsubscribe from this group, send email to starkit-unsubscribe@googlegro=
ups.com<br />
For more options, visit this group at <a href=3D"http://groups.google.com/g=
roup/starkit?hl=3Den">http://groups.google.com/group/starkit?hl=3Den</a>
------=_Part_1340_30308418.1346231952748--