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
What happens when a defer-generated cb() is called back one than once? #11
Comments
Are you trying to figure out how to handle callbacks that are passed for things like progress updates (so they're legitimately called more than once)? Or are there circumstances where the iced implementation might be buggy and you want to catch them? |
I was worried about this case: loop
await fs.watchFile "/path/to/some/changing/file.txt", {}, defer curr, prev
console.log "it changed!" This is an issue because |
defers are being abused, like with mutliple calls per deferral, or a reentry to a dead await block. We still want to allo multi-use of a deferral, and do that in the case of a Rendezvous with the id(1,true) feature.
defers are being abused, like with mutliple calls per deferral, or a reentry to a dead await block. We still want to allo multi-use of a deferral, and do that in the case of a Rendezvous with the id(1,true) feature.
Should maybe make it impotent after the first call, and or have the Deferrals object complain if its counter drops below 0.
The text was updated successfully, but these errors were encountered: