[Info-vax] QIO Writes to a mailbox
JF Mezei
jfmezei.spamnot at vaxination.ca
Fri Nov 4 13:50:53 EDT 2011
When the mailbox is created, it is given a buffer size.
QIO will copy your data to that buffer right away even if there is
nobody at the other end to read it. QIOW will do the same.
However, if there is nobody reading messages, the buffer will fill up,
at which point both QIO and QIOW will hang in a RWMBX state because they
cannot write to the mailbox device. They will unhang when someone reads
the messages.
If a message sporadically gets lost, it could be because someone else
has read it. (for instance, I could use DCL to OPEN myfile MBA9827: and
then issue a READ myfile mybuffer and wait for it to complete. This will
"steal" a message from the mailbox and your application will never see it.
Another possibility is that your receiving application has a bug in it
and does get the message but doesn't process it. You will need to look
at it very carefully to see if strange timing of events might cause this
to happen. (for instance, upon receiving the message, your app thinks it
has already processed it and discards it and issues a new read). Or in
some circumstances, your program may reach a rarely used portion of code
where there is also a QIO read of the mailbox and it gets that message
which your mainline program will never get.
(consider a case where some obscur message type causes your program to
branch to a different subroutine which expects a second mailbox message
to arrive).
More information about the Info-vax
mailing list