Better understanding of websocket connect method

vineet_dhandhania
Hi,

1)
Snippet from sample code:
# Infinite loop on the main thread. Nothing after this will run.
# You have to use the pre-defined callbacks to manage subscriptions.
kws.connect()
I couldn't find the "infinite loop". Where is it? Can't find it in the method definition KiteTicker.connect().

2) Please confirm the below understanding:
When kws.connect() is not threaded then it is nothing but the main thread. However, if I make it threaded -- kws.connect(threaded=True), then it becomes a new thread and the main thread can be continued with more code right after the the kws.connect call. Implying that "Nothing after this will run" is no more valid.
Please confirm.

Thanks.
Tagged:
This discussion has been closed.