[erlang-questions] Mnesia activity callback system context
Paul Mineiro
paul-trapexit@REDACTED
Wed Jan 13 23:47:39 CET 2010
On Wed, 13 Jan 2010, Bernard Duggan wrote:
> Hi List,
> Is it the case that mnesia activity callbacks are guaranteed to
> execute in the same process that is performing the transaction? I can't
> find any mention of it in the docs. I ask because if it's not, it
> doesn't seem like there's any way to get an arbitrary piece of
> information from the latter process to the one in which the callbacks
> execute, and that significantly limits their usefulness for a couple of
> things I'd like to do. (I had written a long email explaining those
> things, but if the answer to this question is "yes" then I can save us
> all a lot of time :))
> Even if the answer is "yes", it still seems like the only way would
> be to use the process dictionary - fine if that's the case, but it seems
> like there "should" be a neater way.
I don't have a strong aversion to the process dictionary, but
mnesia:activity/3,4 take a Fun (closure) and an Args (direct
information passing) both of which would facilitate passing information to
the callback.
So I suspect you're trying to do something unusual or interesting; maybe
the details would help?
-- p
More information about the erlang-questions
mailing list