On Fri Jul 18 20:12:00 2025 +0000, Elizabeth Figura wrote:
Probably worth checking that the event isn't signaled here either.
(At least, I assume it isn't, if there's no APC queued...)
Sure, I will add the tests.
Ugh, I'm blind, it's already tested, and the event *is* signaled. That's literally what you were demonstrating with that hunk that looked wrong to me. Which suddenly doesn't look wrong anymore. Well, there was no way I was getting through this without an "I can't read" moment.
- if (async->data.apc) + if (async->data.apc && !(async->blocking && async->canceled)) { union apc_call data; memset( &data, 0, sizeof(data) ); @@ -525,7 +531,7 @@ void async_set_result( struct object *obj, unsigned int status, apc_param_t tota data.user.args[2] = 0; thread_queue_apc( NULL, async->thread, NULL, &data ); } - else if (async->data.apc_context && (async->pending || + else if (!async->data.apc && async->data.apc_context && (async->pending ||
It'd probably be easier to read if you nest the "if !(blocking && canceled)" part inside the first if.
That'd mess with the subsequent else, wouldn't it?
Though I do agree that's a difficult line. Maybe something like `if (async->data.apc && (!async->blocking || !async->canceled))`?