Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(759)

Side by Side Diff: appengine/swarming/swarming_bot/bot_code/singleton.py

Issue 1860863002: Update copyright notice from Swarming to LUCI; add AUTHORS and CONTRIBUTORS. (Closed) Base URL: git@github.com:luci/luci-py.git@master
Patch Set: . Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright 2015 The Swarming Authors. All rights reserved. 1 # Copyright 2015 The LUCI Authors. All rights reserved.
2 # Use of this source code is governed by the Apache v2.0 license that can be 2 # Use of this source code is governed by the Apache v2.0 license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Implements a singleton.""" 5 """Implements a singleton."""
6 6
7 import contextlib 7 import contextlib
8 import logging 8 import logging
9 import os 9 import os
10 import sys 10 import sys
11 11
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 88
89 @contextlib.contextmanager 89 @contextlib.contextmanager
90 def singleton(rootdir): 90 def singleton(rootdir):
91 s = Singleton(rootdir) 91 s = Singleton(rootdir)
92 acquired = s.acquire() 92 acquired = s.acquire()
93 try: 93 try:
94 yield acquired 94 yield acquired
95 finally: 95 finally:
96 if acquired: 96 if acquired:
97 s.release() 97 s.release()
OLDNEW
« no previous file with comments | « appengine/swarming/swarming_bot/bot_code/common.py ('k') | appengine/swarming/swarming_bot/bot_code/singleton_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698