python - Problem with Twisted and threads -


Some of you who are more experienced than using twisted, maybe I decide to use threads together - But I did this :). And now I am in any kind of trouble - I have an application server listening for client requests and every time a new client connects, it spans the other thread that I might close correctly Because the server closes after some time of heavy use, the processing request is fine, I have 3 different types of threads, and this happens to one of them - this is that I Do not believe that the right way to do this, because Thredkjoind () is not working and cat / proc / & lt; Pid & gt; By stopping / status , the server always stops working by doing threads: 43 .

So I'm looking for

And yes, I know about this question:

And perhaps many others "Twisted way" twisted.internet to do anything outside the reactor loop (aka spelling threads)

is. Threads.deferToThread

For example: twisted.internet import threads def sthToDoInSeparateThread (): returns 3D = threads. DEferThread (sthToDoInSeparateThread)

deferToThread will execute sthToDoInSeparateThread in a separate thread and will return the fire as soon as the thread stops to ed.


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -