Board index » delphi » Saving to floppy using a thread

Saving to floppy using a thread

Hi -
I'm trying to save a small text file to floppy every 20 sec. The main
application incorporates a timer, which must fire each second, within a
hundred mS or so. Unfortunately, the I/O involved with writing the file
causes a delay in the app.
I've written a thread procedure to do this, (using the Windows copyfile
function), which improves matters slightly but still causes problems. What I
cant understand is why another separate application can save files to floppy
almost continuously and not cause any timing faults with my app.
I've tried changing thread priorities but this makes little difference.
I dont really want to launch a separate app. just to save files.
Any ideas?
Thanks
Chris.
--
Chris Lock
 

Re:Saving to floppy using a thread


X-post !!

--
 - Thomas   [blo...@post.com] [http://www.FlowCode.f2s.com]

c.lock <c.l...@kentdesigns.co.uk> skrev i en
nyhedsmeddelelse:ex8w6.46787$bL.4430...@news6-win.server.ntlworld.com...

Quote
> Hi -
> I'm trying to save a small text file to floppy every 20 sec. The main
> application incorporates a timer, which must fire each second, within a
> hundred mS or so. Unfortunately, the I/O involved with writing the file
> causes a delay in the app.
> I've written a thread procedure to do this, (using the Windows copyfile
> function), which improves matters slightly but still causes problems. What
I
> cant understand is why another separate application can save files to
floppy
> almost continuously and not cause any timing faults with my app.
> I've tried changing thread priorities but this makes little difference.
> I dont really want to launch a separate app. just to save files.
> Any ideas?
> Thanks
> Chris.
> --
> Chris Lock

Re:Saving to floppy using a thread


Are you a parking warden?

Quote
Thomas P <blo...@post.com> wrote in message

news:99ru6o$k0m$1@news.inet.tele.dk...
Quote
> X-post !!

> --
>  - Thomas   [blo...@post.com] [http://www.FlowCode.f2s.com]

> c.lock <c.l...@kentdesigns.co.uk> skrev i en
> nyhedsmeddelelse:ex8w6.46787$bL.4430...@news6-win.server.ntlworld.com...
> > Hi -
> > I'm trying to save a small text file to floppy every 20 sec. The main
> > application incorporates a timer, which must fire each second, within a
> > hundred mS or so. Unfortunately, the I/O involved with writing the file
> > causes a delay in the app.
> > I've written a thread procedure to do this, (using the Windows copyfile
> > function), which improves matters slightly but still causes problems.
What
> I
> > cant understand is why another separate application can save files to
> floppy
> > almost continuously and not cause any timing faults with my app.
> > I've tried changing thread priorities but this makes little difference.
> > I dont really want to launch a separate app. just to save files.
> > Any ideas?
> > Thanks
> > Chris.
> > --
> > Chris Lock

Re:Saving to floppy using a thread


Quote
> Are you a parking warden?

No ! I just don't have anything else to do :-) Besides... X-posting is a
really bad thing, and maybe you should consider not to pronounce your
sarcastic oppinions to me, but instead learn from the lessons the usergroups
tells you.

 - Thomas

c.lock <c.l...@kentdesigns.co.uk> skrev i en
nyhedsmeddelelse:a%fw6.235$g76.21...@news2-win.server.ntlworld.com...

Quote

> Thomas P <blo...@post.com> wrote in message
> news:99ru6o$k0m$1@news.inet.tele.dk...
> > X-post !!

> > --
> >  - Thomas   [blo...@post.com] [http://www.FlowCode.f2s.com]

> > c.lock <c.l...@kentdesigns.co.uk> skrev i en
> > nyhedsmeddelelse:ex8w6.46787$bL.4430...@news6-win.server.ntlworld.com...
> > > Hi -
> > > I'm trying to save a small text file to floppy every 20 sec. The main
> > > application incorporates a timer, which must fire each second, within
a
> > > hundred mS or so. Unfortunately, the I/O involved with writing the
file
> > > causes a delay in the app.
> > > I've written a thread procedure to do this, (using the Windows
copyfile
> > > function), which improves matters slightly but still causes problems.
> What
> > I
> > > cant understand is why another separate application can save files to
> > floppy
> > > almost continuously and not cause any timing faults with my app.
> > > I've tried changing thread priorities but this makes little
difference.
> > > I dont really want to launch a separate app. just to save files.
> > > Any ideas?
> > > Thanks
> > > Chris.
> > > --
> > > Chris Lock

Re:Saving to floppy using a thread


Thomas P schrieb:

Quote

> > Are you a parking warden?

> No ! I just don't have anything else to do :-) Besides... X-posting is a
> really bad thing, and maybe you should consider not to pronounce your
> sarcastic oppinions to me, but instead learn from the lessons the usergroups
> tells you.

While we are at it:
-if replying to an X-Post, set an f'up
-quote correctly

:)

--
                                              Andreas
If MTV is a music channel, why do they play rap?

Other Threads