Exemple #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))
Exemple #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))
Exemple #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()
Exemple #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())
Exemple #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()
Exemple #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())
Exemple #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)
Exemple #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)
Exemple #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())
Exemple #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())
Exemple #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))
Exemple #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))
Exemple #13
0
 def pause_writing(self):
     if _debuglocks:
         debug.dumpCaller()
         debug.fmsg('pause writing', self, id(self))
     self.rwLock.write_pause()
Exemple #14
0
 def pause_writing(self):
     if _debuglocks:
         debug.dumpCaller()
         debug.fmsg('pause writing', self, id(self))
     self.rwLock.write_pause()