-
Notifications
You must be signed in to change notification settings - Fork 187
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
Fix async arguments #738
base: master
Are you sure you want to change the base?
Fix async arguments #738
Conversation
src/async.c
Outdated
asarg->max = max; | ||
ret = uv_mutex_init(&asarg->mutex); | ||
if (ret < 0) { // unlikely | ||
abort(); |
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.
we shouldn't be aborting the program, this should be reported as a fail
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.
Fixed in commit 9fa42ef
@@ -55,7 +55,7 @@ jobs: | |||
run: ./build/lua -e "collectgarbage('incremental', 0, 10000000000000)" tests/run.lua | |||
|
|||
valgrind: | |||
runs-on: ubuntu-latest | |||
runs-on: ubuntu-24.04 |
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.
Any context for this change?
Protect async
send()
arguments using a mutex.Use copy for async arguments rather than Lua reference.
Clear arguments in callback and before sending rather than after.
Keep existing and possibly weird behavior.
Allow async to use a FIFO queue.
Fixes #505