Eric Sadit <[EMAIL PROTECTED]> added the comment:

The test script

#!/usr/bin/python

import sys
import thread

f = file("o.test","w")
buff = " " * 1024
def run():
    while 1:
        try:
            f.read(100)
            #
f.write(buff)

        except Exception, e:
            print >>sys.stderr, "An exception, that's OK, ", repr(e)

if __name__ == '__main__':
    thread.start_new_thread(run, (), {})
    while 1:
        try:

On Wed, Jun 25, 2008 at 2:32 PM, Eric Sadit <[EMAIL PROTECTED]> wrote:

>
> Eric Sadit <[EMAIL PROTECTED]> added the comment:
>
> Thanks Amaury
>
> I run a test script and Python 2.5.2 crashes, but 2.6b1 runs perfectly
> throwing a ValueError exception (Operation of closed file)
> in the reader/writer thread and "IOError: close() called during concurrent
> operation on the same file object" in the closer thread.
> Python doesn't crash anymore.
>
> Cheers
>
> Eric Sadit
>
> On Wed, Jun 25, 2008 at 12:44 PM, Amaury Forgeot d'Arc <
> [EMAIL PROTECTED]> wrote:
>
> >
> > Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:
> >
> > This problem may be a duplicate of issue815646 and issue595601, and was
> > probably corrected with r62195.
> >
> > Can you please check with the new python version 2.6b1 ?
> >
> > ----------
> > nosy: +amaury.forgeotdarc
> > resolution:  -> out of date
> > status: open -> pending
> >
> > _______________________________________
> > Python tracker <[EMAIL PROTECTED]>
> > <http://bugs.python.org/issue3200>
> > _______________________________________
> >
>
> Added file: http://bugs.python.org/file10732/unnamed
>
> _______________________________________
> Python tracker <[EMAIL PROTECTED]>
> <http://bugs.python.org/issue3200>
> _______________________________________
>

Added file: http://bugs.python.org/file10733/unnamed

_______________________________________
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue3200>
_______________________________________
The test 
script<br><br>#!/usr/bin/python&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp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p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n!
 bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; except Exception, 
e:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print 
&gt;&gt;sys.stderr, &quot;An exception, that&#39;s OK, &quot;, 
repr(e)<br><br>if __name__ == &#39;__main__&#39;:<br>&nbsp;&nbsp;&nbsp; 
thread.start_new_thread(run, (), {})<br>&nbsp;&nbsp;&nbsp; while 1:<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; try:<br><br><br><div 
class="gmail_quote">On Wed, Jun 25, 2008 at 2:32 PM, Eric Sadit &lt;<a 
href="mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]</a>&gt; wrote:<br><blockquote 
class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 
0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Eric Sadit &lt;<a href="mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]</a>&gt; 
added the comment:<br>
<div class="Ih2E3d"><br>
Thanks Amaury<br>
<br>
I run a test script and Python 2.5.2 crashes, but 2.6b1 runs perfectly<br>
throwing a ValueError exception (Operation of closed file)<br>
in the reader/writer thread and &quot;IOError: close() called during 
concurrent<br>
operation on the same file object&quot; in the closer thread.<br>
Python doesn&#39;t crash anymore.<br>
<br>
Cheers<br>
<br>
Eric Sadit<br>
<br>
On Wed, Jun 25, 2008 at 12:44 PM, Amaury Forgeot d&#39;Arc &lt;<br>
<a href="mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]</a>&gt; wrote:<br>
<br>
&gt;<br>
</div><div><div></div><div class="Wj3C7c">&gt; Amaury Forgeot d&#39;Arc &lt;<a 
href="mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]</a>&gt; added the comment:<br>
&gt;<br>
&gt; This problem may be a duplicate of issue815646 and issue595601, and was<br>
&gt; probably corrected with r62195.<br>
&gt;<br>
&gt; Can you please check with the new python version 2.6b1 ?<br>
&gt;<br>
&gt; ----------<br>
&gt; nosy: +amaury.forgeotdarc<br>
&gt; resolution: &nbsp;-&gt; out of date<br>
&gt; status: open -&gt; pending<br>
&gt;<br>
&gt; _______________________________________<br>
&gt; Python tracker &lt;<a href="mailto:[EMAIL PROTECTED]">[EMAIL 
PROTECTED]</a>&gt;<br>
&gt; &lt;<a href="http://bugs.python.org/issue3200"; 
target="_blank">http://bugs.python.org/issue3200</a>&gt;<br>
&gt; _______________________________________<br>
&gt;<br>
<br>
</div></div>Added file: <a href="http://bugs.python.org/file10732/unnamed"; 
target="_blank">http://bugs.python.org/file10732/unnamed</a><br>
<div><div></div><div class="Wj3C7c"><br>
_______________________________________<br>
Python tracker &lt;<a href="mailto:[EMAIL PROTECTED]">[EMAIL 
PROTECTED]</a>&gt;<br>
&lt;<a href="http://bugs.python.org/issue3200"; 
target="_blank">http://bugs.python.org/issue3200</a>&gt;<br>
_______________________________________</div></div></blockquote></div><br>
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to