I haven't play with the thread stuff in Python (yet) but in general terms
(from a C mind), one should not expect read/write actions to be sequential
across threads. I would assume the Python threads eventually goes back to
some system calls for thread handling. If that were the case, you should
Steven Bethard wrote:
Fernando Perez wrote:
Steven Bethard wrote:
Fernando Perez wrote:
Steven Bethard wrote:
I get the correct output, but if you run this yourself, you'll see
that
the numbers 1 through 10 aren't printed in sync with the writes (i.e.
every half second); they're all printed at t
Fernando Perez wrote:
Steven Bethard wrote:
Fernando Perez wrote:
Steven Bethard wrote:
I get the correct output, but if you run this yourself, you'll see that
the numbers 1 through 10 aren't printed in sync with the writes (i.e.
every half second); they're all printed at the end. Could someone
Steven Bethard wrote:
> Fernando Perez wrote:
>> Steven Bethard wrote:
>>
>>
>>>I get the correct output, but if you run this yourself, you'll see that
>>>the numbers 1 through 10 aren't printed in sync with the writes (i.e.
>>>every half second); they're all printed at the end. Could someone
>
Fernando Perez wrote:
Steven Bethard wrote:
I get the correct output, but if you run this yourself, you'll see that
the numbers 1 through 10 aren't printed in sync with the writes (i.e.
every half second); they're all printed at the end. Could someone
explain to me why this happens, and how (if p
Steven Bethard wrote:
> I get the correct output, but if you run this yourself, you'll see that
> the numbers 1 through 10 aren't printed in sync with the writes (i.e.
> every half second); they're all printed at the end. Could someone
> explain to me why this happens, and how (if possible) I can
Thomas Rast wrote:
Steven Bethard <[EMAIL PROTECTED]> writes:
I get the correct output, but if you run this yourself, you'll see
that the numbers 1 through 10 aren't printed in sync with the writes
(i.e. every half second); they're all printed at the end. Could
someone explain to me why this happe
Steven Bethard <[EMAIL PROTECTED]> writes:
> I get the correct output, but if you run this yourself, you'll see
> that the numbers 1 through 10 aren't printed in sync with the writes
> (i.e. every half second); they're all printed at the end. Could
> someone explain to me why this happens, and ho
I'm playing around with some threading stuff right now, and I'm having a
little trouble calling a function from one thread that affects another.
Here's my setup:
py> import os, threading, time
py> def write(file_in, input_lines):
... for line in input_lines:
... time.sleep(0.5)
...