-
polyphony/ext/polyphony/backend_io_uring.c Line 247 in b10ae24 |
Beta Was this translation helpful? Give feedback.
Answered by
ioquatix
Dec 7, 2021
Replies: 1 comment 2 replies
-
struct io_uring_sqe *sqe = NULL;
while (!sqe) {
io_uring_get_sqe(&data->ring);
rb_thread_schedule();
} This doesn't seem ideal. Can we assume that after calling It also seems like we would encounter race condition. if (data->polling) { // it's true because we called some io_uring blocking method
sqe = ...
// data->polling is now 0 or becomes zero during the next call
io_uring_submit(...) // boom thread unsafe submit
} |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
noteflakes
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This doesn't seem ideal. Can we assume that after calling
io_uring_submit
there will be sqe available in every case?It also seems like we would encounter race condition.