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

Add WorkQueue#unschedule_work or similar #95

Open
king-of-poppk opened this issue Jul 29, 2023 · 0 comments
Open

Add WorkQueue#unschedule_work or similar #95

king-of-poppk opened this issue Jul 29, 2023 · 0 comments

Comments

@king-of-poppk
Copy link

king-of-poppk commented Jul 29, 2023

Would it be possible to add a method to the WorkQueue class that allows to remove a callback from the queue? This probably means changing the return value of schedule_work to some sort of handle if you want to properly reference callbacks that have been queued more than once.

Note that identical cannot be used to search through the queue:

> f <- \() 1
> g <- \() 1
> identical(f, g)
[1] TRUE

PS: Although maybe using ignore.srcref = FALSE is sufficient:

> identical(f, g, ignore.srcref = FALSE)
[1] FALSE
> identical(f, f, ignore.srcref = FALSE)
[1] TRUE
> identical(g, g, ignore.srcref = FALSE)
[1] TRUE
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