[fpc-pascal]dos approx delay fn that releases cpu
Gabor DEAK JAHN
djg at tramontana.co.hu
Wed May 9 21:36:42 CEST 2001
At 5/9/01 05:32 PM, you wrote:
Jonas,
> The problem is that Windows keeps a lock on a file for a few seconds
after a
> (Win32) program has released it, that's all. It's an OS bug/feature,
Could you provide an example program? I tried running several programs on NT
4 now, observing all the handles they keep open (using HandleEx from
SysInternals) and their release was instantaneous as I closed the programs
themselves.
I have written a program some time ago where two EXEs were communicating
through DDE and using a common file for passing data in one direction and
results or error messages in the other. As soon as Program 1 wrote the data
to be processed, closed the file and notified Program 2 to start processing,
the second opened the file and started to work immediately. During the two
seconds you mentioned, hundreds if not thousands of such file close-reopen
operations were made, without any need to wait.
Bye,
Gábor
-------------------------------------------------------------------
Gabor DEAK JAHN -- Budapest, Hungary.
E-mail: djg at tramontana.co.hu
More information about the fpc-pascal
mailing list