I have a Python function get_messages() that is able to retrieve messages from another application via a dll. These messages arrive at a rate of about 30hz, and I need to fill a buffer with these messages, while the main Python application is running and doing things with theses messages. I believe the filling of the buffer should occur in a separate thread. My question is: what is the best Pythonic way to retrieve these messages ? (running a loop in a separate thread is probably not the best solution). Is there a module that is dedicated to this sort of tasks?
Answer according to Doug Ross: consider the Asyncio module.
python - communicating with other applications at high rate