Re: ZwCloseHandle asynchronous on no read/write activity?

Tech-Archive recommends: Speed Up your PC by fixing your registry



why is the perf of closing a handle an issue? are you doing it in a perf
critical path? if so, why are you tearing down resources in a performance
critical path to begin with?

d

--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.


<dmitry.sychov@xxxxxxx> wrote in message
news:1159731046.498726.293540@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Greetings,

I assume ZwCloseHandle is optimized in such a way that is always
returns
immediately, then doing the close asynchronously.

[ of course it is not true if there is running overlapped io over file
handle - this fn
waits for its completion then, but thats ok ]

But what if all read/write jobs are reported to be completed - could
ZwCloseHandle still
initiate i/o request like synchronous file attributes write and most
importantly block in it
waiting for its completion, or updating file metadata will be always
performed asynchronously?

I'am asking this since for me any unpredicted delay is unacceptable -
i'd better always run the
close via separate thread - this is generally slower but at least i can
be sure the thread will not block.

host platform is win xp+

file system could be FAT(hope it does not matter)

thank you

dmitry



.