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
There is a race condition between the two method. If the start() of the observer is called (but not finished, for example started by another thread) and in the mean time a schedule is called it can happen that the watcher never catches any event, basically silently failing the initialization.
The obvious solution could be to put the body of the start() behind the self._lock. After this I was not able to reproduce the race condition again.
Since the initialization done before the thread's actual start() called, as a workaround I can re-arrange my code in order to do similar initialization avoiding the race condition, but this bug should be an easy fix.
The text was updated successfully, but these errors were encountered:
There is a race condition between the two method. If the start() of the observer is called (but not finished, for example started by another thread) and in the mean time a schedule is called it can happen that the watcher never catches any event, basically silently failing the initialization.
The obvious solution could be to put the body of the start() behind the self._lock. After this I was not able to reproduce the race condition again.
Since the initialization done before the thread's actual start() called, as a workaround I can re-arrange my code in order to do similar initialization avoiding the race condition, but this bug should be an easy fix.
The text was updated successfully, but these errors were encountered: