c# - What is the role of InternalBuffer in .net FileWatcher -
By doing something Google, I came to know that 'This file is used to track system actions' but I I do not weaken the utility, in some intermediate buffer the viewer can trigger the event (events) directly!
What is the asynchronous flow of events (copy / modify file) in the synchronous event call? Also, I'm not sure if the file waiter trigger events infinitely.
Can anyone put some light on it?
The built-in Windows API which works FileSystemWatcher Second logic, lpBuffer Note This one- There is a match that you can set with the internal buffers property.
A buffer is necessary because in response to Windows directory changes, users can not easily run user code. These changes are identified by the respective file system drivers, they run in kernel mode. The user mode code requires an expensive mode switch and thread launch switch to run, for each change revealed by each person it is very expensive to start running user mode code and wait to empty the buffer Tax buffer changes.
There is a well documented failure mode for FSW, there may be a lot of changes to maintain. You will see error events in the managed code, increasing buffer size can be of great help, the default buffer is small on 4096 bytes. Making it arbitrarily large is not a good idea, although the buffer space is also required in the kernel and it is taken from the kernel memory pool. This is a limited resource, messing up large amounts from the pool affects all the programs running on the machine.
Comments
Post a Comment