|
|
Hi Donal,
Mmmhh... I guess I was not clear enough. Sorry.
In fact, my interprs are always created/initialized and used from a
the SAME thread.
This is NOT the origin of my problem.
> Tcl_FindExecutable somewhere (it also does library initialization)
Tcl_FindExecutable is called when initializing the program, from the
main thread.
Do you mean I should also call it before creating an interp from a
pthread ? This would differ from what I learned a couple of months
ago, but perhaps...
> Tcl needs to have been configured , with --enable-threads at build time.
Tcl is installed from active state, on my machines.
Do you know if the active state distribution is compiled with --enable-
threads
I'll try various tests with my tcl config...
Best-
Nicolas
On 30 mai, 11:18, "Donal K. Fellows" <donal.k.fell...@xxxxxxxxx>
wrote:
> Nicolas Castagne wrote:
> > I'll try to pass my program through gdb tomorrow, and check where the
> > error is raised in Tcl_Init.
>
> I bet that won't help. You'll find something, but miss the fact that
> you're passing an interpreter between threads. *That* is the problem.
> Don't do it!
>
> > However, since the pb may be due to my tcl installation, does anyone
> > know if there is some special flags to pass when compiling and
> > installing Tcl to enable the creation, initialisation, and use of
> > interpreters from a pthread ?
>
> Tcl needs to have been configured with --enable-threads at build time.
> (This isn't the default for obscure reasons that you probably don't
> care about.) Apart from that, you should make sure that you call
> Tcl_FindExecutable somewhere (it also does library initialization) and
> that you keep all use of a particular Tcl interpreter to a single
> thread; passing interpreters between threads is *not* supported and is
> likely to blow up in your face.
>
> Donal.
|
|