JuliaPluto / BetterFileWatching.jl

FileWatching but based on Deno.watchFs
MIT License
14 stars 0 forks source link

Bug with unwatching #3

Open AhmedSalih3d opened 2 years ago

AhmedSalih3d commented 2 years ago

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 commented 2 years ago

Could you post the output of versioninfo()?

AhmedSalih3d commented 2 years ago

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 commented 1 year ago

The help page of schedule says:

image

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