multithreading - basic python server using spawn/threads -


There is a problem I am facing. And it should be very simple.

I have an app that keeps the data in the "A" DIR will be a series of data files.

I have to be a constantly running server, which has a constant look at the DIR, and when looking at a full file in DIR, the server creates a spawn / fork / thread (in the exact word / Python Not sure which one does some work

Actually, I'm going to include / execfile ("foo") an external file in the thread, to work, in the file "A" Depending on the file.

I want to be able to run multiple threads at the same time. That's why I am trying to run the whole process as soon as possible, and I must run multiple threads in parallel to implement the thread / spawn / thorny process. There is no communication between different process processes

I have seen various examples using twisted, etc. But I think I am thinking ..

Any simple / complete example I can play with is great !! (The specimen signals on the net would also be good ...

thanks ...

< P> In Python, you should consider using a module instead of a thread, especially if you have a multicore machine:

Multiprocessing is a package that uses spawning using an API Processes Threading Module. Multiprocessing package provides both local and remote sensitization The Global Interpreter locks the lock effectively using the subprocess instead of threads, due to this, the multiprocessing module allows the programmer to fully take advantage of many processors on a given machine.

>

Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -