also looking at this
fix(ios): report async pool exhaustion as busy
#267
19 files
+53
-65
| @@ -419,16 +419,13 @@ fn requestAccess(store: Id, sels: Sels, ticket: ios_async.Ticket) void { | ||
| 419 | 419 | request(store, sels.request_access, ek_entity_type_event, accessBlock(ticket)); |
| 420 | 420 | } |
| 421 | 421 | |
| 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. | |
| 426 | 423 | fn poolFull(action: []const u8) bridge_error.BridgeError { |
| 427 | 424 | std.log.warn( |
| 428 | 425 | "{s} refused: all {d} async slots are in flight", |
| 429 | 426 | .{ action, ios_async.max_in_flight }, |
| 430 | 427 | ); |
| 431 | return bridge_error.BridgeError.InvalidParameter; | |
| 428 | return bridge_error.BridgeError.Busy; | |
| 432 | 429 | } |
| 433 | 430 | |
| 434 | 431 | // ============================================================================= |