"I ended up spawning a separate thread to submit reqMktData() requests to the cycling message loop."
The correct way to do it is to spawn a separate thread to run app.run(). This thread will KEEP LISTENING( send and receive TWS messages through the port). So asking main thread to do it will prevent you from doing anything else.
Main thread can do reqMketData() and will return immediately. The spawned thread (running app.run) will give you the results from TWS.
The correct way to do it is to spawn a separate thread to run app.run(). This thread will KEEP LISTENING( send and receive TWS messages through the port). So asking main thread to do it will prevent you from doing anything else.
Main thread can do reqMketData() and will return immediately. The spawned thread (running app.run) will give you the results from TWS.