-
Notifications
You must be signed in to change notification settings - Fork 2
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
#204 workaround #244
base: main
Are you sure you want to change the base?
#204 workaround #244
Conversation
so do you see the delete happen once and that stops the flood and the code can further run again after that? last time the bug/fix/issue was that I hadn't cancel() a timeout context |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks a lot for having spent time on this - I'm still wondering what causes the un finished timeout/first timeout
@@ -36,6 +36,7 @@ parser-test: | |||
TINYGO_STACKS:=-stack-size=40mb | |||
|
|||
wasm: Makefile *.go */*.go $(GEN) wasm/wasm_exec.js wasm/wasm_exec.html wasm/grol_wasm.html | |||
sed -i 's/console.warn("scheduleTimeoutEvent: missed timeout event");/this._scheduledTimeouts.delete(id);\nconsole.warn("scheduleTimeoutEvent: missed timeout event");/' wasm/wasm_exec.js |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just do the sed in a pipe instead of the copy (where wasm/wasm_exec.js is being created/copied a bit below)
@@ -1,3 +1,4 @@ | |||
<!doctype html><html><head><meta charset="utf-8"><title>Grol</title></head> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a fragment that is reused mid page, can't have that here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
function debounce(func) { | ||
/** | ||
* A singular task ES6++ mutex | ||
* inspired by this https://blog.jcoglan.com/2016/07/12/mutexes-and-javascript/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was asking on discord about JS mutexes... before being sent the debounce route
does that queue mean if I press the button 10 times (or hit return 10 times in text entry), it'll queue 10 runs? I'm not sure that's better than throwing them away ?
@@ -185,3 +219,4 @@ | |||
document.getElementById('input').value = decodeURIComponent(paramValue) | |||
} | |||
</script> | |||
</html> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same, can't be here
Apologies I didn't try yet, been having too much fun with https://github.com/fortio/terminal - yet thoughts about the feedback? (I think you've been busy too) |
It's a draft PR
The main bug is probably related to this workaround