JuliaPluto / PlutoHooks.jl

Get hooked on Pluto!
https://juliapluto.github.io/PlutoHooks.jl/src/notebook.html
MIT License
23 stars 1 forks source link

trigger cleanup function also if cell is disabled #13

Open schlichtanders opened 1 year ago

schlichtanders commented 1 year ago

Awesome tools!

I am experimenting with these hook mechanisms and realised that the cleanup function, e.g. specified to @use_effect won't trigger if the cell is disabled.

I guess that is a bug?

For instance if I use @use_task from PlutoLinks.jl which builds on top of @use_effect, the task won't be Interrupted if it is disabled. But disabling means it should not run, or?

fonsp commented 1 year ago

Hey Stephan!

Thanks for your issue, currently busy but we will reply in a couple of weeks! Looks like this still needs to be implemented indeed, feel free to already look at the Pluto.jl code and start a PR :)

Op 4 mei 2023 om 12:53 heeft Stephan Sahm @.***> het volgende geschreven:

 Awesome tools!

I am experimenting with these hook mechanisms and realised that the cleanup function, e.g. specified to @use_effect won't trigger if the cell is disabled.

I guess that is a bug?

For instance if I use @use_task from PlutoLinks.jl which builds on top of @use_effect, the task won't be Interrupted if it is disabled. But disabling means it should not run, or?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.