Title: | DECmcc user notes file. Does not replace IPMT. |
Notice: | Use IPMT for problems. Newsletter location in note 6187 |
Moderator: | TAEC::BEROUD |
Created: | Mon Aug 21 1989 |
Last Modified: | Wed Jun 04 1997 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 6497 |
Total number of notes: | 27359 |
Hi, I'm writing an Event Sink module, using V1.1 Callable DECmcc, and I'm using a system global section and a common event flag cluster to communicate with the Access Module process. In the Event Sink code, the only DECmcc routines I will be calling are mcc_event_put, mcc_mir_create_instance, mcc_mir_read_instance_key, and the create/acquire/release/delete lock routines. The main loop of the Event Sink is a SYS$WFLOR call, waiting for one of several common event flags to be set. My question is: this SYS$WFLOR call will make the Event Sink hibernate (at least, that's what happens in my test program) and I'm wondering if this will cause problems for any of the DECmcc routines that I will be calling. Do all of those DECmcc routines complete synchronously? Thank you, Cathy
T.R | Title | User | Personal Name | Date | Lines |
---|---|---|---|---|---|
1462.1 | Please don't do that | TOOK::GUERTIN | Don't fight fire with flames | Mon Sep 09 1991 10:08 | 11 |
Waiting for event flags is ILLEGAL. You should never block the process for any reason (however, we trap QIOW's and convert them to QIO's so they do not block). Having said that, it appears as though the only thing you would be blocking is the threads package itself (which forks off 1 or 2 threads for itself), since there would be no other threads running. It might work. I'm sure there is a more elegant solution out there. (By the way, the MCC Event Manager itself uses a global section, but uses locks instead of Event Flags to communicate, since locks will not block.) -Matt. | |||||
1462.2 | To answer the second question... | TOOK::GUERTIN | Don't fight fire with flames | Mon Sep 09 1991 10:25 | 5 |
Anything which does I/O completes asynchronously at the lower levels, but completes synchronously at the higher levels. That is how thread context switching is accomplished in the MTS threads package. -Matt. | |||||
1462.3 | I'm glad I asked | NWACES::KIMMEL | Mon Sep 09 1991 12:43 | 4 | |
Thanks for your quick response! I'll redesign the code to not wait for event flags. Cathy |