I structured my code such that the websocket connection occurs through a separate thread from the main thread in my code and the connection and events are handled on that thread. But when I am calling KiteTicker.connect() on the child thread, I am getting the below error : ``` While calling system event trigger handler Traceback (most recent call last): File "/Users/abhijeet/projects/code/py/jupy/xts/myenv3.9.6/lib/python3.9/site-packages/twisted/internet/base.py", line 518, in _continueFiring callable(*args, **kwargs) File "/Users/abhijeet/projects/code/py/jupy/xts/myenv3.9.6/lib/python3.9/site-packages/twisted/internet/base.py", line 951, in _reallyStartRunning self._signals.install() File "/Users/abhijeet/projects/code/py/jupy/xts/myenv3.9.6/lib/python3.9/site-packages/twisted/internet/_signals.py", line 190, in install d.install() File "/Users/abhijeet/projects/code/py/jupy/xts/myenv3.9.6/lib/python3.9/site-packages/twisted/internet/_signals.py", line 149, in install signal.signal(signal.SIGINT, self._sigInt) File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/signal.py", line 47, in signal handler = _signal.signal(_enum_to_int(signalnum), _enum_to_int(handler)) builtins.ValueError: signal only works in main thread of the main interpreter ```
On searching I found the twisted library used makes it compulsory to call the connect on main thread and not allow the signal handling and connection to be done from a child thread.
Is it really not possible to use the structure I designed here? Is there a work-around for this?