HP3000-L Archives

October 2000, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Erik Vistica <[log in to unmask]>
Reply To:
Erik Vistica <[log in to unmask]>
Date:
Fri, 20 Oct 2000 19:47:29 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (39 lines)
The default behavior is for the FREAD to return with EOF when there are
no more records *and* no writers (except for the first FREAD which can
be solved as Stan said). IIRC FFILEINFO can return the number of
readers/writers for a msg file.

Could you elaborate on the timing of the readers vs writers (any
combination or does the writer always close the file before the reader
accesses it)?

Is this a 'polling' type application? (msg files work great for
'interrupt' driven things)

Multiple writers at the same time?
Multiple readers at the same time? (unlikely but ya never know)

Could the reader just hang on the empty msg file and trigger another
process to do it's thing (via a 2nd msgfile perhaps)?

It sounds like you may be trying to do some sort of polling check on the
message file and then do other processing. If you break the two tasks
apart, you may be able to manage them easier (this is all just
speculation on my part).


"Born, Ken" wrote:
>
> Greetings,
> I need to create a loop within a program that will continuously fread a
> mesage file and exit when there are no more records to read.  I could use
> the FCONTROL with a timeout of a second, but if the file is empty when I
> first perform the loop, I want to exit out without having to wait a full
> second.
>
> I was thinking about using FFILEINFO but I am not sure which item num will
> give me the results(there are over 100 item nums).
> or maybe using FLABEL?
>
> Any suggestions?

ATOM RSS1 RSS2