zerodha / pykiteconnect

The official Python client library for the Kite Connect trading APIs
MIT License
978 stars 467 forks source link

threaded ticker comment says 'nothing will run after this', but it does! #96

Closed rushiagr closed 2 years ago

rushiagr commented 3 years ago

file: examples/threaded_ticker.py

vividvilla commented 3 years ago

Comment was wrong, will be fixed in next version.

ranjanrak commented 2 years ago

Setting threaded=True creates a new daemon thread and an infinite while loop is used in this example to keep the main thread alive/blocked. Multi-line comments here explain the same. You can use anything from static sleep to threading wait event loop to block the main thread as per your requirement.