[Ecls-list] Some questions about embedding ecl

Juan Jose Garcia Ripoll lisp at arrakis.es
Fri Apr 7 06:29:00 UTC 2006


On Fri, 2006-04-07 at 13:20 +0000, Bruce O'Neel wrote:
> - I can call ecl from C. I can call C from ecl.  Can I call from C to
> ECL, back to C, and then back into ECL?  ie, can I nest ECL calls?

Yes

> - I assume the default is that within a program you have one lisp
> world.  Can I have more than one?  Ie, can I have two threads, each of
> which calls into ECL, and and those ecl lisp worlds are separate?

ECL automatically creates one lisp world per thread. There was some work
about registering threads with ECL but it is highly experimental.

> - What happens if both of those threads are active at once in
> different lisp worlds?

Nothing. As I said thread <-> lisp environment

> - What happens if both of those thread are active in the same lisp
> world?

No way.

> - If I have two separate ECL worlds, how separate are they?  Ie, do
> they share function definitions or are they completely separate.  What
> happens if they both load the same .fas file?

They share function definitions. They can share global variable
bindings. There is a global mutex so that only one thread can load FASL
files at a time, but otherwise, once the FASL file is loaded it will be
used by all threads.

Juanjo

-- 
Max-Planck-Institut für Quantenoptik
Hans-Kopfermann-Str. 1, Garching, D-85748, Germany
Phone: +49 89 32905 345   Fax: +49 89 32905 336
http://www.mpq.mpg.de/Theorygroup/CIRAC/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20060407/d16f24f1/attachment.sig>


More information about the ecl-devel mailing list