-
-
Notifications
You must be signed in to change notification settings - Fork 248
Open
Labels
Description
As mentioned by @moswald in #38 ...
- In parallel, Thread A calls
EnqueueAsync()and Thread B callsDeleteQueueAsync() - Thread A passes through
EnsureQueueCreatedAsync(), ensuring_queueClientis not null - Thread B deletes the queue, setting
_queueClientto null - Thread A tries to use
_queueCleintwhich is now null
There's not really a nice way to handle this without locking. Couple of solutions:
Option 1
Wrap _queueClient in a property which throws a slightly different exception, leaving the user to retry.
Option 2
Implement retry logic (preferably in QueueBase).