multithreading - python threading/fork? -


I am creating a dragon script which needs to do 3 things at once, what is a good way to get it, As I have heard of GIL, I am not so lean to use the thread.
Two items of things that are very important, they will be very active to do a lot of work and then when I ask that the user needs to report on the third thing socket (hence it is a small server Will be like) about the status of the other 2 processes.
Now my question will be a good way to achieve this? I do not want to do three separate scripts, and even using the thread due to GIL, I think I will not get much performance and I will make things worse. My script is a fork 2 process that will report to the user through his job and main process? And what kind of processes can I communicate with the main process?

LE: : To be more accurate 1 thread, they should receive email from an IPAP server and store them in the database, get another thread from DB messages The one who needs to send and send them and the main thread should be a small HTTP server that will accept only one URL and show the status of those two threads in Jason format. So what are Threads OK? Will work be done simultaneously or will there be issues of performance due to Gill?

I think you can use the package which has the same API as the threading package, Get better performance with multiple cores on the CPU

To see the benefits of performance using threading rather than multiprocessing, compare the average time of the same program using multiprocessing x threading.


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -