l4-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: notifications


From: Marcus Brinkmann
Subject: Re: notifications
Date: Sun, 10 Oct 2004 01:51:22 +0200
User-agent: Wanderlust/2.10.1 (Watching The Wheels) SEMI/1.14.6 (Maruoka) FLIM/1.14.6 (Marutamachi) APEL/10.6 Emacs/21.3 (i386-pc-linux-gnu) MULE/5.0 (SAKAKI)

At Sun, 10 Oct 2004 01:37:06 +0200,
Marcus Brinkmann wrote:
> However, it is bad news as I don't know how you could let this new
> processing thread know about _which_ RPC is cancelled.

Just got an idea.

If you shift the semantics a bit from:

  manager -> worker -> deferred worker

to

  manager -> worker -> deferred manager

then it works.  Because then you can actually simply propagate the
cancel request from the manager to the deferred manager.

The deferred manager doesn't need to be a full blown RPC manager, as
all RPCs are always routed through the real manager, which does the
bunch of the work.  In fact, the deferred manager can be very
lightweight.  It just needs to be able to handle simple things like
cancellation requests, which it gets from the real manager for
deferred RPCs.  And of course internal protocols to actually do
something interesting, like notifying pending waiters of task deaths
etc.

The only thing the manager must do is to mark in pending_rpcs if the
processing thread is a real worker thread, or a deferred manager, so
it can either call pthread_cancel directly, or propagate the
cancellation request.  

If anybody follows my line of thought at all here, then I am sure he
will immediately realize how clean and delighting this solution is ;)

Thanks,
Marcus






reply via email to

[Prev in Thread] Current Thread [Next in Thread]