How to implement queue functions in multithreading?

We need to make sure that the library was carried out according to queue jobs from different modules
The library does not support multithreading
Please provide the simplest example of how it can be implemented

There is a file in which I join two modules and run in multithreading
Both modules connect to the same library Telegram
But this library does not support multithreading
How to implement queue? As a separately attached file with this library? and so on
June 8th 19 at 16:34
1 answer
June 8th 19 at 16:36
You need to make a "thread" out of the script
If the script processes the requests - nginx-uWSGI-flask(django)
If batch processing - -parameter_from 0-10 parameter_to
In rare cases when you want a real queue - celery

Find more questions by tags Message queuesPythonmultithreading