also looking at this
fix(ios): report async pool exhaustion as busy
#267
19 files
+53
-65
| @@ -343,16 +343,13 @@ pub const ContactsBridge = struct { | ||
| 343 | 343 | } |
| 344 | 344 | }; |
| 345 | 345 | |
| 346 | /// The answer for a full block pool, copied from `bridge_mobile_location` and | |
| 347 | /// the picker: `BridgeError` has no "Busy", `INVALID_PARAMETER` is the | |
| 348 | /// migration notes' designated stand-in, and the point is that the caller gets | |
| 349 | /// an explicit rejection instead of a promise that never settles. | |
| 346 | /// Reject a call when every asynchronous reply slot is already in use. | |
| 350 | 347 | fn poolFull(action: []const u8) bridge_error.BridgeError { |
| 351 | 348 | std.log.warn( |
| 352 | 349 | "{s} refused: all {d} async slots are in flight", |
| 353 | 350 | .{ action, ios_async.max_in_flight }, |
| 354 | 351 | ); |
| 355 | return bridge_error.BridgeError.InvalidParameter; | |
| 352 | return bridge_error.BridgeError.Busy; | |
| 356 | 353 | } |
| 357 | 354 | |
| 358 | 355 | // ============================================================================= |