Is it not possible to acomplish this with a token-based algorithm?<br><br>With 3 Threads: A, B and C<br><br>Thread A start with Token.<br>Thread with the token writes the byte and send the token to the next<br><br>Or python has any issues to a file object shared among a few threads?
<br><br>[]'s<br>Flavio<br><br><div><span class="gmail_quote">On 5/6/07, <b class="gmail_sendername">Marc 'BlackJack' Rintsch</b> <<a href="mailto:bj_666@gmx.net">bj_666@gmx.net</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
In <<a href="mailto:1178440537.257526.40980@y5g2000hsa.googlegroups.com">1178440537.257526.40980@y5g2000hsa.googlegroups.com</a>>, est wrote:<br><br>> I need to write a file using 3 threads simutaniously, e.g. Thread 1
<br>> write the first byte of test.bin with an "a", second thread write the<br>> second byte "b", third thread write the third byte "c". Anyone could<br>> give a little example on how to do that?
<br><br>Simplest solution is: don't do that.  Write from one thread and send the<br>date from the other threads via a `Queue.Queue` to the writing thread.<br>Send the number of the thread with the data so the writer thread knows in
<br>which order the data has to be written.<br><br>> I have my code, but it makes python intepreter crash everytime on my<br>> Vista.<br><br>Show minimal (non-)working  code, tell us the exception plus traceback and
<br>explain "crash".<br><br>Ciao,<br>        Marc 'BlackJack' Rintsch<br>--<br><a href="http://mail.python.org/mailman/listinfo/python-list">http://mail.python.org/mailman/listinfo/python-list</a><br></blockquote>
</div><br>