Re: writing files in the Tick events when each write takes longer than the interval



thanks
"rowe_newsgroups" <rowe_email@xxxxxxxxx> wrote in message
news:50b2992a-3438-4b6e-8940-f7fe40c36ba6@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Aug 1, 9:55 am, "AAaron123" <aaaron...@xxxxxxxxxxxxxx> wrote:
Not sure what you mean about the queue. I'd have to save the images and
the
queue would write them?
Is that what you mean.

In my post I should have said: it is much like saving the frames of a
movie.

Thanks

"rowe_newsgroups" <rowe_em...@xxxxxxxxx> wrote in message

news:c99930ac-e6dc-4f8b-8a56-efe557fa049a@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Aug 1, 9:33 am, "AAaron123" <aaaron...@xxxxxxxxxxxxxx> wrote:



I have a timer. At each tick, say 0.1 second, I write a file.

If it takes more than 0.1 second to write the file the app will not work
correctly.

How can I tell in the tick event if the previous file finished writing
so
I
can skip writing at that time?

I write using the Bitmap.Save method.

Maybe I could Open, Write, Close synchronously??

Any ideas?

What happens if the Click event takes more that 0.3 seconds to exit.

Do the click events pile up and then come right after each other or are
the
past ones simply missed?

Thanks

You need to find a solution that doesn't rely on time, otherwise you
will spend the rest of the project's life debugging race conditions.

Is it possible to use a message queue to track the writes? The tick
event would write to the queue, and then the the changes could be
written out from the queue asynchronously.

Also, why not just keep the bitmap in memory and write it to a file
when the changes are done?

Thanks,

Seth Rowe [MVP]http://sethrowe.blogspot.com/

At first take, yes you would need to save each bitmap into the queue
and then write them to files asynchronously.

Thanks,

Seth Rowe [MVP]
http://sethrowe.blogspot.com/


.



Relevant Pages

  • Re: sched_ule, runqueues, priority, and O(1) sheduling question
    ... > priority order until the current queue is empty. ... To find a thread with higher priority first non-empty queue should ... There is a bitmap for all queues and each bit in this ...
    (freebsd-hackers)
  • Re: writing files in the Tick events when each write takes longer than the interval
    ... In my post I should have said: it is much like saving the frames of a movie. ... Is it possible to use a message queue to track the writes? ... Seth Rowe http://sethrowe.blogspot.com/ ... yes you would need to save each bitmap into the queue ...
    (microsoft.public.dotnet.languages.vb)
  • Re: 6.0 BETA1 if_ath problems
    ... tx queue 0, ... 110 tx frames discarded prior to association ... 26131 rx failed 'cuz of bad CRC ... 30 rx discard 'cuz mcast echo ...
    (freebsd-current)
  • Re: Dispatcher
    ... The thread getting the frames puts them in some sort of queue. ... Each recipient lives in its own thread and is basically waiting for a ... > b) a listener attached which is there to stay (needs to receive in order, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: AVStream: DMA & Process() QUEUEing
    ... How can the QUEUE be empty when I have cloned stream pointers on a Frames? ... > As I said you should do KsPinAttemptProcessing when the DMA completes. ...
    (microsoft.public.development.device.drivers)