@SRIJAN - Well you made it light weight by just dumping the tick into a global variable instead of doing calculus on it. If it is not threaded then it is game over. But with threaded you can still keep playing. It is not a production level solution,…
Why redifine on_ticks? Just define it the right way first time itself.
There is no difference between assigning kws.on_tick before or after kws.connect. As long as the code behaviour inside the before and after functions is same, there is no differ…
@SRIJAN - Certainly threaded is better. As you can do more with two than one thread. But no separate callback to kws.on_ticks is needed. esp. under the while loop as the original thread emphasizes. That is just wasteful and not needed.
I was trying…
@SRIJAN - Thanks for your response pasted below. Though that will avoid the multiple definitions of on_tick in the while loop, but it is no different than if you had not run the reactor threaded. If your computations could have finished within one t…
Also, as per my understanding, all that threaded=True in kws.connect call does is to run the reactor in a separate thread. So, when later in while loop in the main thread, when you assign the kws.on_ticks to one of the hundreds of instances of on_ti…
@rakeshr - The solution 2 you have proposed in the other thread. That is using threaded=True and a while True loop in the main thread. Will that not generate hundreds of copies of on_ticks and helper_method functions every second as it continuously …