Re: Composing tasks and protected objects



Florian Weimer wrote:
Suppose I want to write a selective accept which reads messages from a
queue, and also support a special entry call to reload the
configuration.

You need all calls to go the same way. Right now you're trying to do something like


+----------+          +----------+          +----------+
|          |          |          |          |          |
|     Q    |<--Get----|  Server  |<--Shut---|     ?    |
|          |          |          |   Down   |          |
|          |          |          |<--Reload-|          |
|          |          |          |          |          |
+----------+          +----------+          +----------+

where arrows indicate direction of call. This won't work, but it will work if you can turn that call to Get around. For this, you need a forwarder between the Queue and Server:

+----------+       +----------+       +----------+       +----------+
|          |       |          |       |          |       |          |
|     Q    |<-Get--| Forwarder|--Msg->|  Server  |<-Etc--|     ?    |
|          |       |          |       |          |       |          |
+----------+       +----------+       +----------+       +----------+

Now your task can look like

select
   accept Msg (Message : in ...) do
      Current_Message := Message;
   end Msg;

   Process_Message (Current_Message);
or
   ... -- as in your example
end select;

The only difficulty is terminating the Forwarder.

--
Jeff Carter
"Go and boil your bottoms."
Monty Python & the Holy Grail
01
.



Relevant Pages

  • Re: can IIS disallow page reloads() by code ?
    ... JS:reloadis script code executed on the client ... So you are looking at client-side configuration. ... "Hernán Castelo" wrote in message ... > Page reload has nothing to do with IIS configuration. ...
    (microsoft.public.inetserver.iis)
  • IPFW question
    ... how can I reload the whole thing? ... ipfw command is for creating and deleting individual rules. ... whole firewall configuration anytime. ...
    (freebsd-questions)
  • Re: only reload racoon.conf?
    ... > support a service restart. ... > rcvar status poll) ... A restart should invoke the programme to reload it's configuration. ...
    (freebsd-isp)
  • Re: errors while starting named
    ... If you are already running named, the correct way to reload the ... configuration, after making changes to it, is *NOT* to manually run ... Then, you need to fix the db.10.* zone files, because they have some ... To unsubscribe, ...
    (freebsd-net)