Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to ensure streams a actually scheduled by the time the call returns? #45

Open
couling opened this issue Sep 11, 2020 · 0 comments

Comments

@couling
Copy link

couling commented Sep 11, 2020

Similar to #20 but subtly different. I'm having trouble with a race condition formed of the following:

Main thread:

  • Creates Observer
  • adds Stream
  • starts Observer thread
  • modifies a file

Observer thread:

Expected behaviour here might be for the observer to always be notified of the file modification. The stream is registered on the main thread before the file is modified. But because that will be cached in the python object and only registered with the OS library on a separate thread, the OS native library might not be informed of the stream until after it was modified.

It would be great if all schedule events could be in place by the time the .schedule method completes.

@couling couling changed the title Is it possibl Is it possible to ensure streams a actually scheduled by the time the call returns? Sep 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant