XChange
XChange copied to clipboard
[core] Order book synchronized
Added OrderBook synchronization through the StampedLock mechanism, which is much faster and more flexible than usual Synhcronzed. That gives us the opportunity to receive a full copy of the orderbook without a chance to get an Concurrent exception.
bump
ping
It's hard for me to tell if this PR works as designed in addition to not breaking things for someone relying on this.
added concurrency tests.
- New way, in use StampedLock
- Old way, Stampdelock wrapped in Synchonized