On Tue, 24 Feb 2009, Daniel Ruoso wrote:

Em Seg, 2009-02-23 às 19:49 -0800, Larry Wall escreveu:
On Tue, Feb 24, 2009 at 04:01:40PM +1300, Martin D Kealey wrote:
: Conceptually I think they should all go in add-on(s), however I suspect that
: when an exception is thrown inside a signal handler, cleanly unwinding the
: call chain will need special support in the core.
Which should already be there, presumably, as defined in S04 and such.
Some signals like CONT want to get translated to resumable exceptions
and others like SEGV to non-resumable.


Agreed, every signal could just be a control exception with no special
behavior (except being potentially resumable), simply:

* ControlExceptionSigHUP
* ControlExceptionSigTERM
* ControlExceptionSigINT
* and so on...

Then defining a signal handler is just a matter of a CONTROL block that
catches that exception. This would mean something that is very important
in terms of concurrency, which is that the signal handling code that is
registered in the OS is simply there to raise the exception, once that
happens, the regular execution flows to the CONTROL block.

We would just need to decide if a signal should be seen by all of the
concurrent threads (green-threads or os-threads), or if there is a
"main" thread that would receive the exceptions or how the user can
tweak that behavior...

Well, now that we seem(?) to have eliminated the need for %*SIG, could we use that for defining which thread gets the signals?

        :)


---------------------------------------------------------------------
| Name: Tim Nelson                 | Because the Creator is,        |
| E-mail: wayl...@wayland.id.au    | I am                           |
---------------------------------------------------------------------

----BEGIN GEEK CODE BLOCK----
Version 3.12
GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+>++ PGP->+++ R(+) !tv b++ DI++++ D G+ e++>++++ h! y-
-----END GEEK CODE BLOCK-----

Reply via email to