ReviewOS

also looking at this

craft-native/craft

fix(ios): report async pool exhaustion as busy

#267
Merged glennmichael123 wants to merge codex/ios-busy-error-code into main
19 files +53 -65
packages/zig/src/bridge_mobile_calendar.zigmodified+2-5
Changes to packages/zig/src/bridge_mobile_calendar.zig
@@ -419,16 +419,13 @@ fn requestAccess(store: Id, sels: Sels, ticket: ios_async.Ticket) void {
419419 request(store, sels.request_access, ek_entity_type_event, accessBlock(ticket));
420420}
421421
422/// The answer for a full block pool, copied from `bridge_mobile_location`:
423/// `BridgeError` has no "Busy", `INVALID_PARAMETER` is the migration notes'
424/// designated stand-in, and the point is that the caller gets an explicit
425/// rejection instead of a promise that never settles.
422/// Reject a call when every asynchronous reply slot is already in use.
426423fn poolFull(action: []const u8) bridge_error.BridgeError {
427424 std.log.warn(
428425 "{s} refused: all {d} async slots are in flight",
429426 .{ action, ios_async.max_in_flight },
430427 );
431 return bridge_error.BridgeError.InvalidParameter;
428 return bridge_error.BridgeError.Busy;
432429}
433430
434431// =============================================================================