You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.
I am using pathwatcher in my own component and love it. I was using it the other day in a bigger project and all of the sudden I wasn't getting any notifications anymore.
After debugging pathwatcher it turns out to be a limitation in the Windows API that pathwatcher uses:
To wait on more than MAXIMUM_WAIT_OBJECTS handles, use one of the following methods:
Create a thread to wait on MAXIMUM_WAIT_OBJECTS handles, then wait on that thread plus the other handles. Use this technique to break the handles into groups of MAXIMUM_WAIT_OBJECTS.
Call RegisterWaitForSingleObject to wait on each handle. A wait thread from the thread pool waits on MAXIMUM_WAIT_OBJECTS registered objects and assigns a worker thread after the object is signaled or the time-out interval expires.
Can this be fixed please ?
Btw, with your 65th directory the PlatformThread() function ends up in a continuous loop that uses 100% CPU as the function doesn't wait anymore but returns immediately. At a minimum the code should check the size and not pass in more than 64 objects.
The text was updated successfully, but these errors were encountered:
I am using pathwatcher in my own component and love it. I was using it the other day in a bigger project and all of the sudden I wasn't getting any notifications anymore.
After debugging pathwatcher it turns out to be a limitation in the Windows API that pathwatcher uses:
in function PlatformThread() in pathwatcher_win.cc
Luckily there is a workaround to this problem given in the documentation on MSDN
https://msdn.microsoft.com/en-us/library/windows/desktop/ms687025(v=vs.85).aspx
Can this be fixed please ?
Btw, with your 65th directory the PlatformThread() function ends up in a continuous loop that uses 100% CPU as the function doesn't wait anymore but returns immediately. At a minimum the code should check the size and not pass in more than 64 objects.
The text was updated successfully, but these errors were encountered: