[erlang-questions] idea: Erlang FFI: callbacks and memory management

Alceste Scalas alceste@REDACTED
Wed Dec 12 16:50:35 CET 2007

Il giorno mer, 12/12/2007 alle 12.19 +0100, Bjorn Gustavsson ha scritto:
> Alceste Scalas <alceste@REDACTED> writes:
> > I think it depends on my previous questions: is it possible to execute
> > an Erlang fun() from within a BIF, and get its return term?  How?
> It is currently not possible to execute a fun from a BIF and return to the BIF.
> There is, however, an internal mechanism to make a tail-recursive call
> to Erlang code from a BIF. The called Erlang code could in turn make a call
> to another BIF.

Thank you for the clarification.  I think that it invalidates my
hypothesis about "easy" Erlang callbacks through FFI calls --- unless
"currently not possible" implies "...but we may think about adding this
possibility, sooner or later" :-)

The other, slower and more complex approach I've proposed for obtaining
Erlang "callbacks" with linked-in drivers should remain valid, though
(see [1]).




[1] Erlang callbacks, linked-in drivers and threads

Alceste Scalas <alceste@REDACTED>
CRS4 - http://www.crs4.it/

More information about the erlang-questions mailing list