-
Notifications
You must be signed in to change notification settings - Fork 168
Open
Labels
addition/proposalNew features or enhancementsNew features or enhancementsneeds implementer interestMoving the issue forward requires implementers to express interestMoving the issue forward requires implementers to express interest
Description
What problem are you trying to solve?
I have a pending reader.read(), but at some point I'm no longer interested in the result, so I call reader.releaseLock(), allowing for another reader to come along later.
This rejects reader.read() with a TypeError, which is indistinguishable from other kinds of 'worse' errors.
I'd rather it rejected with something like an AbortError, as failure is expected in this case.
What solutions exist today?
I guess setting some boolean when I call releaseLock(), so I know to ignore the error, then just hope the error wasn't relating to something else.
How would you solve it?
I guess reader.releaseLock(reason).
Anything else?
No response
Metadata
Metadata
Assignees
Labels
addition/proposalNew features or enhancementsNew features or enhancementsneeds implementer interestMoving the issue forward requires implementers to express interestMoving the issue forward requires implementers to express interest