Re: writing files in the Tick events when each write takes longer than the interval
- From: rowe_newsgroups <rowe_email@xxxxxxxxx>
- Date: Fri, 1 Aug 2008 08:41:58 -0700 (PDT)
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/
.
- Follow-Ups:
- References:
- writing files in the Tick events when each write takes longer than the interval
- From: AAaron123
- Re: writing files in the Tick events when each write takes longer than the interval
- From: rowe_newsgroups
- Re: writing files in the Tick events when each write takes longer than the interval
- From: AAaron123
- writing files in the Tick events when each write takes longer than the interval
- Prev by Date: Re: Installing Service
- Next by Date: exiting an SSIS
- Previous by thread: Re: writing files in the Tick events when each write takes longer than the interval
- Next by thread: Re: writing files in the Tick events when each write takes longer than the interval
- Index(es):
Relevant Pages
|