Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _new_default_loop(self):
return GLibEventLoop(GLib.main_context_default())
def _new_default_loop(self):
return GLibEventLoop(gtk=True)
self._check_signal(sig)
try:
self._sighandlers.pop(sig).cancel()
return True
except KeyError:
return False
def get_debug(self):
pass
def set_debug(self):
pass
#TODO: move it into unix_events
GLibEventLoop = BaseGLibEventLoop
class _LoopImplem:
def __init__(self, loop):
self._loop = loop
def run(self):
raise NotImplementedError()
def stop(self):
raise NotImplementedError()
class _GLibLoopImplem(_LoopImplem):
def __init__(self, loop):
super().__init__(loop)
@staticmethod
def init_class():
if not hasattr(BaseGLibEventLoop, "_default_sigint_handler"):
BaseGLibEventLoop._default_sigint_handler = BaseGLibEventLoop.DefaultSigINTHandler()
def new_event_loop(self):
if self._default and isinstance(threading.current_thread(), threading._MainThread):
l = self.get_default_loop()
elif self._full:
l = GLibEventLoop()
else:
l = unix_events.DefaultEventLoopPolicy.new_event_loop(self._policy)
return l