Help: Guide needed in trying to delete/flush the content of a fifo file.

Ton ph.ton.sharma at gmail.com
Mon Nov 15 06:03:57 EST 2010


On Nov 14, 11:55 pm, MRAB <pyt... at mrabarnett.plus.com> wrote:
> On 14/11/2010 14:48, ton ph wrote:> Hi python geeks,
> >    I have  problem which i have been trying to find out for the past
> > some days, i have a device which feeds info to my fifo continuosly, and
> > a thread of mine reads the
> > fifo continuosly. Now when i change a parameter in the device, it sends
> > me different values. Now my problem is that , i want to get rid of the
> > contents of my previous info which
> > is present in my buffer of the fifo.So i want to flush the fifo content
> > when my device starts sending different info .... i am implementing
> > writing and reading the fifo  using two different threads.
> > Please someone guide me solving my problem.
> > I highly apologise everyone in case my post is not so clear...
> > Thanks everyone in advance.
>
> When the info changes, the thread which is putting items into the fifo
> could flush it just by getting items from it (using a non-blocking get)
> until it's empty.

Hi Mrab,
 Thanks for your immediate reply , can you please guide me with any
tool or library function which i can flush my fifo content .. i use
os.mkfifo() to make the fifo. Or is there any other way i could do
this ...
Thanks



More information about the Python-list mailing list