Ensure timely termination of all flask servers
[osm/vim-emu.git] / src / emuvim / api / rest / rest_api_endpoint.py
index 4f9d6d8..a9a863d 100755 (executable)
@@ -28,6 +28,7 @@ import logging
 import threading
 from flask import Flask
 from flask_restful import Api
+from gevent import monkey
 from gevent.pywsgi import WSGIServer
 
 # need to import total module to set its global variable dcs
@@ -44,6 +45,8 @@ from monitor import MonitorInterfaceAction, MonitorFlowAction, MonitorLinkAction
 import pkg_resources
 from os import path
 
+monkey.patch_all()
+
 logging.basicConfig()