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

Unified Diff: servermanager.py

Issue 23469002: [webpagereplay] Add command exit. (Closed) Base URL: http://web-page-replay.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « customhandlers.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: servermanager.py
===================================================================
--- servermanager.py (revision 519)
+++ servermanager.py (working copy)
@@ -34,6 +34,7 @@
self.record_callbacks = []
self.replay_callbacks = []
self.is_record_mode = is_record_mode
+ self.should_exit = False
def Append(self, initializer, *init_args, **init_kwargs):
"""Append a server to the end of the list to run.
@@ -99,6 +100,8 @@
server.__enter__()
while True:
time.sleep(1)
+ if self.should_exit:
chrisgao (Use stgao instead) 2013/08/27 16:34:18 I think we don't need a lock for |should_exit|. It
tonyg 2013/08/28 01:35:58 Agreed. Python's GIL takes care of this.
+ break
except:
exception_info = sys.exc_info()
finally:
« no previous file with comments | « customhandlers.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698