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

Bug with unwatching #3

Open
AhmedSalih3d opened this issue Aug 27, 2022 · 3 comments
Open

Bug with unwatching #3

AhmedSalih3d opened this issue Aug 27, 2022 · 3 comments

Comments

@AhmedSalih3d
Copy link

AhmedSalih3d commented Aug 27, 2022

Hello!

Testing your code:

using BetterFileWatching

watch_task = @async watch_folder(".") do event
    @info "Something changed!" event
    @info typeof(event)
end

sleep(5)

# stop watching the folder
schedule(watch_task, InterruptException(); error=true)

After the task is done, it keeps registering changes unfortunately in the folder. How to fix?

Kind regards

@fonsp
Copy link
Member

fonsp commented Sep 5, 2022

Could you post the output of versioninfo()?

@AhmedSalih3d
Copy link
Author

Here you go:

versioninfo() Julia Version 1.8.0 Commit 5544a0fab7 (2022-08-17 13:38 UTC) Platform Info: OS: Windows (x86_64-w64-mingw32) CPU: 8 WORD_SIZE: 64 LIBM: libopenlibm LLVM: libLLVM-13.0.1 (ORCJIT, skylake) Threads: 1 on 8 virtual cores

I removed the specific CPU but this should hopefully be enough

Kind regards

@pankgeorg
Copy link
Member

pankgeorg commented Sep 7, 2023

The help page of schedule says:

image

What does Base.throwto(watch_task, InterruptException()) do?

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

3 participants