Some thread/GC questions
daniel at turtleware.eu
Thu Mar 10 06:25:06 UTC 2016
OK, sorry then for this mistake of mine.
Dnia 10 marca 2016 00:59:53 CET, Juraj Variny <juraj at blava.eu> napisał(a):
>> > On Wednesday 09 March 2016 09:07:38 you wrote:
>> >> Hello,
>> >> Juraj Variny writes:
>> >> > Hello,
>> >> >
>> >> > can you please tell me how to:
>> >> >
>> >> > 1. Initialize lisp environment in a thread that was already
>> >> > C/C++ app? Is it possible for it to share existing lisp
>> >> There is an example in examples/embed directory (file hello.c).
>> >> you mean by sharing an existing lisp environment? cl_boot creates
>> >> environment for this instance.
>> > Say I have main thread, where cl_boot was called, with some lisp
>> > Then I call cl_boot in some other pre-existing thread, would it be
>> > access lisp environment of the main thread, evaluate symbols
>> > call functions etc? This is what I meant with shared environment.
>> It is enought to call cl_boot once. Calling it a second time won't do
>> any harm, but the cl_boot isn't thread-safe, so don't call it twice
>> the same time from different threads.
>> After calling cl_boot once you should be able to work with lisp from
>This "working with lisp from any thread" I have tried, and got
>and corruption immediately. Seems that ecl_env_ptr is thread-local
>and should be properly initialized for every thread where lisp is used.
Sent from my Android device with K-9 Mail. Please excuse my brevity.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ecl-devel