Author flox
Recipients DazWorrall, alex, brian.curtin, carljm, coderanger, dabeaz, eric.smith, flox, jhylton, karld, kevinwatters, loewis, mahmoudimus, pitrou, rcohen, rh0dium, tarek
Date 2010-03-15.15:44:40
SpamBayes Score 6.39897e-09
Marked as misclassified No
Message-id <>
With line buffering, I see the issue.

 * 6 s without thread
 * 115 s with the spinning thread (varying: 60 s, 98 s)
 * 16 s with the spinning thread and the last "gilinter.patch"

# Modified version of the test case, with bufsize=1

from threading import Thread
import time

def writenums(f, n):
    start = time.time()
    for x in range(n):
        f.write("%d\n" % x)
    end = time.time()

def spin():
    while True:

t1 = Thread(target=spin)
# Uncomment to add a thread

# With line buffering
writenums(open("./nums", "w", 1), 1000000)
Date User Action Args
2010-03-15 15:44:42floxsetrecipients: + flox, loewis, jhylton, pitrou, eric.smith, kevinwatters, tarek, karld, carljm, coderanger, alex, brian.curtin, DazWorrall, rh0dium, rcohen, dabeaz, mahmoudimus
2010-03-15 15:44:42floxsetmessageid: <>
2010-03-15 15:44:40floxlinkissue7946 messages
2010-03-15 15:44:40floxcreate