Does blockConcurrencyWhile() block the entire Durable Object?
I have a DO with two methods:
Problem: When User A calls slowWrite() via RPC, User B's fastRead() waits 15 seconds too.
Questions:
1. Does blockConcurrencyWhile() put the entire DO in a "locked" state, blocking ALL incoming RPC calls?
2. Proposed solution - Route through fetch() instead:
Will this allow GET /read to execute without waiting when POST /write is running?
Thanks! 🙏
1 Reply
Got it, thanks for clarifying! Follow-up question: is there a way to block concurrency for a specific DO method rather than the entire object?
Just to clarify - when you said "use traditional locks", did you mean implementing it manually like this with a Promise queue?
Thanks