reordered methods in SignalRouter
This commit is contained in:
parent
07708d1454
commit
f0ad4aff7d
1 changed files with 3 additions and 3 deletions
|
@ -2,12 +2,12 @@ from signal import pthread_kill
|
||||||
from signal import signal as sigsignal
|
from signal import signal as sigsignal
|
||||||
|
|
||||||
class SignalRouter:
|
class SignalRouter:
|
||||||
def __route_signal(self, signal, frame):
|
|
||||||
pthread_kill(self.signal_thread_dictionary[signal], signal)
|
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.signal_thread_dictionary = {}
|
self.signal_thread_dictionary = {}
|
||||||
|
|
||||||
|
def __route_signal(self, signal, frame):
|
||||||
|
pthread_kill(self.signal_thread_dictionary[signal], signal)
|
||||||
|
|
||||||
def register_signal_thread(self, signal, thread_ident):
|
def register_signal_thread(self, signal, thread_ident):
|
||||||
self.signal_thread_dictionary[signal] = thread_ident
|
self.signal_thread_dictionary[signal] = thread_ident
|
||||||
sigsignal(signal, self.__route_signal)
|
sigsignal(signal, self.__route_signal)
|
||||||
|
|
Loading…
Reference in a new issue