diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2008-08-15 00:05:08 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2008-08-15 00:05:08 (GMT) |
commit | e1e48ea29bc04cff9739f6ab4cb991604060a55f (patch) | |
tree | edf58760f7cd00265fc09a369ebe3c9b104742e1 /Lib/io.py | |
parent | 8769576477b88b05e6c857e6a63bed506eae014e (diff) | |
download | cpython-e1e48ea29bc04cff9739f6ab4cb991604060a55f.zip cpython-e1e48ea29bc04cff9739f6ab4cb991604060a55f.tar.gz cpython-e1e48ea29bc04cff9739f6ab4cb991604060a55f.tar.bz2 |
Fix build from a blank checkout by using the _thread module instead of threading in io.py
(thanks Christian!)
Diffstat (limited to 'Lib/io.py')
-rw-r--r-- | Lib/io.py | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -61,7 +61,7 @@ import sys import codecs import _fileio import warnings -import threading +from _thread import allocate_lock as Lock # open() uses st_blksize whenever we can DEFAULT_BUFFER_SIZE = 8 * 1024 # bytes @@ -896,7 +896,7 @@ class BufferedReader(_BufferedIOMixin): _BufferedIOMixin.__init__(self, raw) self.buffer_size = buffer_size self._reset_read_buf() - self._read_lock = threading.Lock() + self._read_lock = Lock() def _reset_read_buf(self): self._read_buf = b"" @@ -1022,7 +1022,7 @@ class BufferedWriter(_BufferedIOMixin): if max_buffer_size is None else max_buffer_size) self._write_buf = bytearray() - self._write_lock = threading.Lock() + self._write_lock = Lock() def write(self, b): if self.closed: |