>>>>> "Csaba" == csaba <csaba.henk / gmail.com> writes:
Csaba> Clifford T. Matthews wrote:
>> I wrote some code that deliberately uses continuations that
>> cross a fork boundary. When I went to test it, I was surprised
>> by the error: "continuation called across trap". I can think
>> of a few reasons why people might not want to use continuations
>> across fork, but not knowing Ruby internals particularly well,
>> I couldn't see a reason why it should be absolutely prohibited.
Csaba> I've been playing with this (not recently though, one or
Csaba> two years ago). I've also experienced the "continuation
Csaba> called across trap" phenomenon. However, I also made a try
Csaba> with the 1.9 branch... and cross-fork continuations were
Csaba> working there! Hopefully it's still working, I suggest you
Csaba> to make a try with that.
ruby 1.9.0 (2006-10-02) from CVS HEAD gives the same "continuation
called across trap" RuntimeError.
Friday afternoon I did a little more research and then posted to
ruby-core, but, not surprisingly for such a low-priority esoteric
matter, so far nobody has replied over there.
I think the error is a side-effect of code that was put in place to
prevent truly illegal uses of continuations. E.g., before the checks
were in place, it was possible to define a continuation within a
signal handler and then call it from outside the signal handler.
--
Cliff Matthews <ctm / ardi.com>
+1 505 363 5754 Cell