-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
market: eliminate race in SubmitOrderAsync and Run's defer
Simplify orderRouter channel access coordination. Solve an order submission race in Run's defer by launching a goroutine to drain m.orderRouter prior to flagging the Market as stopped, and end the drain goroutine by closing the orderRouter channel. The new runMtx RWMutex simplifies this. Add test coverage for Market.Status.
- Loading branch information
Showing
2 changed files
with
63 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters