While fixing the threading bug in #1399 (merged in #1410), I noticed that the respSO lists passed to each submitOrder thread are never read after the threads are joined.
respSO = []
tSubmitOrder = threading.Thread(
target=self.submitOrder,
args=(qty, self.stockUniverse[index], "sell", respSO),
)
tSubmitOrder.start()
threads.append(tSubmitOrder)
After x.join(), the collected responses in respSO are ignored. If submitOrder is meant to return order status or fill information through this list, it's being silently discarded. If it's not needed, the parameter could be removed to simplify the code.
Spotted during the #1399 fix.
While fixing the threading bug in #1399 (merged in #1410), I noticed that the
respSOlists passed to eachsubmitOrderthread are never read after the threads are joined.After
x.join(), the collected responses inrespSOare ignored. IfsubmitOrderis meant to return order status or fill information through this list, it's being silently discarded. If it's not needed, the parameter could be removed to simplify the code.Spotted during the #1399 fix.