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

#204 workaround #244

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

MikalaiLappo
Copy link

It's a draft PR

  1. Makefile should also handle bsd sed

The main bug is probably related to this workaround

@ldemailly
Copy link
Member

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

Copy link
Member

@ldemailly ldemailly left a 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
Copy link
Member

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>
Copy link
Member

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

Copy link
Member

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/
Copy link
Member

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>
Copy link
Member

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

@ldemailly
Copy link
Member

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)

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

Successfully merging this pull request may close these issues.

2 participants