Example #1
0
 def resume_writing(self):           # a useful skill for job applicants
     if _debuglocks:
         debug.dumpCaller()
         debug.fmsg('resuming writing', self, id(self))
     self.rwLock.write_resume()
     if _debuglocks:
         debug.fmsg('resumed writing', self, id(self))
Example #2
0
 def resume_writing(self):  # a useful skill for job applicants
     if _debuglocks:
         debug.dumpCaller()
         debug.fmsg('resuming writing', self, id(self))
     self.rwLock.write_resume()
     if _debuglocks:
         debug.fmsg('resumed writing', self, id(self))
Example #3
0
 def end_writing(self):
     parent = self.getParent()       # See comment above
     if parent:
         parent.end_reading() 
     if _debuglocks:
         debug.dumpCaller()
         debug.fmsg('end writing', self, id(self))
     self.rwLock.write_release()
Example #4
0
 def end_reading(self):
     parent = self.getParent()
     if parent:
         parent.end_reading()
     self.rwLock.read_release()
     if _debuglocks:
         debug.dumpCaller()
         debug.fmsg('ended reading', self, id(self), self.rwLock.nReaders())
Example #5
0
 def end_writing(self):
     parent = self.getParent()  # See comment above
     if parent:
         parent.end_reading()
     if _debuglocks:
         debug.dumpCaller()
         debug.fmsg('end writing', self, id(self))
     self.rwLock.write_release()
Example #6
0
 def end_reading(self):
     parent = self.getParent()
     if parent:
         parent.end_reading()
     self.rwLock.read_release()
     if _debuglocks:
         debug.dumpCaller()
         debug.fmsg('ended reading', self, id(self), self.rwLock.nReaders())
Example #7
0
 def reserve(self):
     if _debuglocks:
         debug.dumpCaller()
         debug.fmsg('reserving', self)
     self.reservation_lock.acquire()
     if _debuglocks:
         debug.fmsg('reserved', self)
     self.have_reservation = 1
     switchboard.notify("made reservation", self)
Example #8
0
 def reserve(self):
     if _debuglocks:
         debug.dumpCaller()
         debug.fmsg('reserving', self)
     self.reservation_lock.acquire()
     if _debuglocks:
         debug.fmsg('reserved', self)
     self.have_reservation = 1
     switchboard.notify("made reservation", self)
Example #9
0
 def begin_reading(self):
     if _debuglocks:
         debug.dumpCaller()
         debug.fmsg('acquiring read lock', self, id(self))
     self.rwLock.read_acquire()
     parent = self.getParent()
     if parent:
         parent.begin_reading()
     if _debuglocks:
         debug.fmsg('acquired read lock', self, id(self),
                    self.rwLock.nReaders())
Example #10
0
 def begin_reading(self):
     if _debuglocks:
         debug.dumpCaller()
         debug.fmsg('acquiring read lock', self, id(self))
     self.rwLock.read_acquire()
     parent = self.getParent()
     if parent:
         parent.begin_reading()
     if _debuglocks:
         debug.fmsg('acquired read lock', self, id(self),
                    self.rwLock.nReaders())
Example #11
0
 def begin_writing(self):
     if _debuglocks:
         debug.dumpCaller()
         debug.fmsg('acquiring write lock', self, id(self))
     self.rwLock.write_acquire()
     # While changing an object, make sure that its parents don't
     # change as well, because that could effectively change the
     # object...  Since we're not actually changing the parent, we
     # just acquire the read lock.
     parent = self.getParent()
     if parent:
         parent.begin_reading()
     if _debuglocks:
         debug.fmsg('acquired write lock', self, id(self))
Example #12
0
 def begin_writing(self):
     if _debuglocks:
         debug.dumpCaller()
         debug.fmsg('acquiring write lock', self, id(self))
     self.rwLock.write_acquire()
     # While changing an object, make sure that its parents don't
     # change as well, because that could effectively change the
     # object...  Since we're not actually changing the parent, we
     # just acquire the read lock.
     parent = self.getParent()
     if parent:
         parent.begin_reading()
     if _debuglocks:
         debug.fmsg('acquired write lock', self, id(self))
Example #13
0
 def pause_writing(self):
     if _debuglocks:
         debug.dumpCaller()
         debug.fmsg('pause writing', self, id(self))
     self.rwLock.write_pause()
Example #14
0
 def pause_writing(self):
     if _debuglocks:
         debug.dumpCaller()
         debug.fmsg('pause writing', self, id(self))
     self.rwLock.write_pause()