Embedded thread-enabled Tcl and packages
Hello out there,
I am embedding a thread enabled Tcl. In this binary I am also
including a package X (formerly it was a DLL, but I thought it would
be a good idea to just link it in).
In the init sequence I call the X_Init function which 'provides' this
package. All is well: When my Tcl script starts I can make a
package present X
and I get the version number.
However, this is a multi-threaded Tcl app, and my threads need this
package, too. Formerly, when creating a thread I would just do a
package require X
and it would get loaded from the DLL.
Now, no more DLL, but the package /is/ there - right in the binary. Is
there a way to pass it from the main thread to my worker threads?
Or how can I get my threads to load it?
Any insight will be greatly appreciated.
Best regards
Helmut Giese
.
Relevant Pages
- Re: GUI acts dead
... | The dll could not be loaded. ... | searching from My.exe/../lib, but I want it to search in Me.exe/lib. ... linking directly against Tcl and Tk. ... and there was no 'package ifneeded' before that, ... (comp.lang.tcl) - Re: now do you "link" .tcl files?
... I think from the position of a newbie, this is how linking in Tcl ... At the time of the call, Tcl looks up the command named "foo" using ... pkgIndex.tcl for a Tcl-only package usually contains ... (comp.lang.tcl) - Re: Question about loading a DLL
... tells the package loader how to find/load the package, ... Then you can load/initialize the dll via: ... - load has no path to search ... initialization procedure will have the form pkg_Init, where pkg is the same as ... (comp.lang.tcl) - Re: Why TCL?
... The typical reason you see other languages have things like this is ... Tcl extension packages available as well. ... :And installing the MD5 package for TCL was too painful for me. ... in other scripting language camps wanted something similar. ... (comp.lang.tcl) - Re: New list commands ... What do you think ?
... That's the risk of every developer writing basic commands. ... allow some discussion about some of them, that are really good for core ... runtime consuming and could be done more efficiencly in C using the tcl ... Critcl builds a package which is loaded. ... (comp.lang.tcl) |
|