I have a design problem:
I have two threads, a heartbeat/control thread and a messagehandler thread.
Both are sharing the same socket, however the messageHan
I don't know of a way to prioritize at the Python level.
So I'd suggest using 2 processes, not threads, and prioritize at the OS level. On Unix you can use os.nice() to do that.
You'd need to use 2 sockets then, and your sharing problem would be solved at the same time.