~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to loggerhead/lockfile.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2008-04-06 22:39:49 UTC
  • mfrom: (153.1.1 annotate-fix)
  • Revision ID: launchpad@pqm.canonical.com-20080406223949-q56j4n2qffm4b7p0
[r=mwh] Fix a typo in annotate.kid.

Show diffs side-by-side

added added

removed removed

Lines of Context:
57
57
            self._count += 1
58
58
            return True
59
59
        try:
60
 
            fd = os.open(self._filename,
61
 
                         os.O_WRONLY | os.O_CREAT | os.O_EXCL, 0600)
 
60
            fd = os.open(self._filename, os.O_WRONLY | os.O_CREAT | os.O_EXCL, 0600)
62
61
            os.close(fd)
63
62
            self._count += 1
64
63
            return True
66
65
            return False
67
66
 
68
67
    def acquire(self):
69
 
        # try over and over, sleeping on exponential backoff with
70
 
        # an upper limit of about 5 seconds
 
68
        # try over and over, sleeping on exponential backoff with an upper limit of about 5 seconds
71
69
        pause = 0.1
72
70
        #max_pause = 5.0
73
71
        max_pause = 0.1