in reply to Database queueing and signals

I'm vary of using signals too much. When you use signals you must take care about all manners of signal handlers, worry about signals coming whil you're still processing the previous signal etc.

My preferred approach would be to open a pipe to each process - then the process can just block on reading from the pipe - when a message comes in, it can go off and process it. There is no need to worry that messages arriving too quickly will overwrite/override each other, and since a lot of processes use the "block on reading socket/pipe" model of waiting for data, it is well understood and well optimized for.

Replies are listed 'Best First'.
Re: Re: Database queueing and signals
by Marcello (Hermit) on Apr 07, 2004 at 08:25 UTC
    Hi,

    I don't need to worry about signals coming while still processing the previous signal. Since the server process checks the database queue twice per second, it does not matter if you "loose" a signal every now and then.