Hi,<br><br>I have a client server model in twisted, where the server spawns a thread ( basically a test script in python that runs for about 20 mins)<br>I want to track the progress of the thread, and send the progress to the client back<br>
<br>So, I write something like this in my server:<br><br>parent_conn, child_conn = Pipe()<br>thread = Process(target = start_test.main_func, args=(SCRIPT_PATH, TEMP_OUTPUT_PATH, self.output_name, child_conn))<br>thread.start()<br>
<br>response = parent_conn.recv()<br>print response //prints like: initialization done<br>self.transport.write(response)<br>                <br><br>response = parent_conn.recv()<br>print response // configuration done<br>
self.transport.write(response)<br><br>.<br>.<br>.<br>                <br>thread.join()<br><br><br>But the transport.write calls don&#39;t send at the same time. instead they wait for the thread to finish (coz of thread.join) and then append all the response and send it back; like  &quot;initialization doneconfiguration done...done&quot;<br>
thereby defeating the purpose of creating a thread.<br><br>How do I give the control to the reactor to write the data back, and still keep the thread running?<br>or is there any other way these kinda of progress can be tracked ?<br>
I am kinda stuck with this :(<br><br>