Example #1
0
 def __init__(self, filename, mode='rb', bufsize=1 << 14):
     assert (type(filename) == str and mode.startswith('r')
             and (0 < len(mode) < 3) and buffer > 0)
     self.sync_buffer = bufsize
     self.async_buffers = collections.deque([])
     thread_loop.synchronize(self)
     self.synchronized((sync_open, (self, filename, mode, bufsize)))
Example #2
0
 def __init__ (self, filename, mode='wb', bufsize=-1):
         assert (
                 type (filename) == str and
                 not mode.startswith ('r') and 
                 (0 < len (mode) < 3)
                 )
         thread_loop.synchronize (self)
         self.synchronized ((
                 sync_open, (self, filename, mode, bufsize)
                 ))
Example #3
0
 def __init__ (self, filename, mode='rb', bufsize=1<<14):
         assert (
                 type (filename) == str and
                 mode.startswith ('r') and 
                 (0 < len (mode) < 3) and
                 buffer > 0
                 )
         self.sync_buffer = bufsize
         self.async_buffers = collections.deque([])
         thread_loop.synchronize (self)
         self.synchronized ((
                 sync_open, (self, filename, mode, bufsize)
                 ))
Example #4
0
 def __init__ (self):
         thread_loop.synchronize (self)
Example #5
0
 def __init__ (self):
         self.async_buffers = collections.deque([])
         thread_loop.synchronize (self)
Example #6
0
 def __init__(self):
     thread_loop.synchronize(self)
Example #7
0
 def __init__(self):
     self.async_buffers = collections.deque([])
     thread_loop.synchronize(self)
Example #8
0
 def __init__(self, filename, mode='wb', bufsize=-1):
     assert (type(filename) == str and not mode.startswith('r')
             and (0 < len(mode) < 3))
     thread_loop.synchronize(self)
     self.synchronized((sync_open, (self, filename, mode, bufsize)))