[Ecls-list] cl_boot() segfaults when called not in the main thread

Juan Jose Garcia-Ripoll juanjose.garciaripoll at googlemail.com
Tue Jul 14 10:17:24 UTC 2009


cl_boot() can only be used _once_ and it only has to be used once: it
simply allocates the resources for ECL, registering symbols,
functions, etc.

If you need to run Common Lisp code in other threads, use

extern ECL_API void ecl_import_current_thread(cl_object process_name,
cl_object process_binding);
extern ECL_API void ecl_release_current_thread(void);

to register/release the currently running thread with ECL. You only
need to release the thread when it is going to be destroyed, not on
every use.

Juanjo

On Tue, Jul 14, 2009 at 11:33 AM, Kamil Shakirov<kamils80 at gmail.com> wrote:
> Hi,
>
> Is that possible to boot/use embedded ECL not in the main thread? My
> application uses plugins (shared libraries) that are loaded on demand.
> Each plugin starts its own thread to serve requests from the main
> application. cl_boot() segfaults when called from the created plugin's
> thread (there is only one plugin that uses ECL)

-- 
Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
http://juanjose.garciaripoll.googlepages.com




More information about the ecl-devel mailing list