Article View: comp.windows.x
Article #37749Re: Problem with Signals
From: Scott Parcel
Date: Tue, 06 Mar 1990 19:35
Date: Tue, 06 Mar 1990 19:35
21 lines
1812 bytes
1812 bytes
>This wouldn't solve the original problem I had that started all this. I wanted a
>way for my process to wake up periodically and flush out the event queue to
>keep it from overflowing. For instance, what if I had a model solver that was
>going to take 7 hours to run a solve on a model. The user clicks a SOLVE widget
>and its out of the event loop for 7 hours. During that time all kinds of events
>could be received into the queue and not serviced causing it to eventually
>overflow. I wanted to use setitimer and signal to periodically check the queue,
>but the problems I had are what started this discussion.
Perhaps I'm repeat prior info, but, to process events during the 7 hour loop I'd:
1. Setup to get SIGIO signals when X event data arrives on the event queue.
2. Mask signals or use some other protection technique to only allow processing
the signals and the event queue when you know its safe. (Safe to me means
your not in the middle of any nonreentrant functions which might be called
during the signal handler event processing.) If your only concerned with
using the signal handler to process events during a 7 hour mathmatical
computation this might be easy.
I'm doing this kind of thing and it works fairly well. There are some more
refinements which can be needed in some situations.
-- scott parcel@intellicorp.com
-------
Technical Details
Message-ID:
<9003061933.AA03304@expo.lcs.mit.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!snorkelwacker!bloom-beacon!INTELLICORP.COM!PARCELShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!snorkelwacker!bloom-beacon!INTELLICORP.COM!PARCEL From: PARCEL@INTELLICORP.COM (Scott Parcel) Newsgroups: comp.windows.x Subject: Re: Problem with Signals Message-ID: <9003061933.AA03304@expo.lcs.mit.edu> Date: 6 Mar 90 19:35:36 GMT Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 21