notes are not compatable with threaded applications.

notes are not intended for general communications. what
is your intended application?  you may want send/recv instead.

notes aren't substantially weaker.  they solve a different
problem. from notify(2)
          When a process raises an exceptional condition such as
          dividing by zero or writing on a closed pipe, ...
signals have become a general purpose communication channel
on unix.  the condition need not be exceptional.  for example
bind's named is reloaded with SIGHUP.

on plan 9, instead of using a note, a server's control file (or files)
would be bound into the namespace.  for example, ndb/dns
is reloaded with 
        echo reload>/net/dns

the bind guys don't like signals either.  from the named(8) man page

       In routine operation, signals should not be used to control the
       nameserver; rndc should be used instead.

- erik

> Ok, so, in a normal multi-threaded program on any POSIX capable system
> I would normally:
>       1) block all signals
>       2) spawn a thread whose only job is to process signals
>               a) sigtimedwait() on desired signals
>               b) process signals as "events" other threads can "see"
>       3) other threads retrieve "events" from the signal thread at
>          their convenience
> 
> With the Notes API being substantially weaker. How does one go about
> creating a proper multi-threaded application on Plan 9 with robust
> Note processing akin to the above POSIX method?
> 
> Is there a way to block all notes and wait() until the desired time
> to catch all Notes?
> 
> Don

Reply via email to