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

async: fix re_async_cancel mqueue handling #995

Merged
merged 3 commits into from
Oct 31, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/async/async.c
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,8 @@ void re_async_cancel(struct re_async *async, intptr_t id)
w->workh = NULL;
w->cb = NULL;
w->arg = mem_deref(w->arg);
list_move(&w->le, &async->freel);
/* No move to free list since queueh must always handled if
* mqueue_push is called */
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't see why this change has something to do if the pipe is read or not.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pipe queueh is always executed (since it's FIFO), so the free list move must be done there.

mtx_unlock(w->mtx);
}

Expand Down
Loading