From 9e6d3053c00b28a9ac9435b05e4987d9f8ce8843 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Thu, 25 Apr 2013 16:05:50 +0900 Subject: sweep the tree to change from gevent to ryu.lib.hub mostly mechanical changes. also, change the requirement from gevent to eventlet. Signed-off-by: YAMAMOTO Takashi Signed-off-by: FUJITA Tomonori --- bin/ryu-manager | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'bin/ryu-manager') diff --git a/bin/ryu-manager b/bin/ryu-manager index d9cc8059..62188dea 100755 --- a/bin/ryu-manager +++ b/bin/ryu-manager @@ -16,9 +16,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -import gevent -from gevent import monkey -monkey.patch_all() +from ryu.lib import hub +hub.patch() # TODO: # Right now, we have our own patched copy of ovs python bindings @@ -69,16 +68,16 @@ def main(): services = [] ctlr = controller.OpenFlowController() - thr = gevent.spawn_later(0, ctlr) + thr = hub.spawn(ctlr) services.append(thr) webapp = wsgi.start_service(app_mgr) if webapp: - thr = gevent.spawn_later(0, webapp) + thr = hub.spawn(webapp) services.append(thr) try: - gevent.joinall(services) + hub.joinall(services) finally: app_mgr.close() -- cgit v1.2.3