Skip to content

Instantly share code, notes, and snippets.

@solalatus
Last active February 11, 2019 19:50
Show Gist options
  • Save solalatus/119ac10b84412ed2c27c7b6e4e026361 to your computer and use it in GitHub Desktop.
Save solalatus/119ac10b84412ed2c27c7b6e4e026361 to your computer and use it in GitHub Desktop.
import _thread
import ...whatever the orderbook needs to be..
def multi_order_sumit(thread_num):
print("This is thread",thread_num)
LOB = instance of an orderbook please ()
for i in range(1000):
result = LOB.submit_order( some test cases with incermentally groving price or such...) #or whatever it is callled
return whatever we ecpect result to be
_thread.start_new_thread( multi_order_submit, ("Thread-1", ) )
_thread.start_new_thread( multi_order_submit, ("Thread-2", ) )
#Are we happy?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment