Process signal *s*. All of the functions registered to receive callbacks on *s* will be called with ``*args`` and ``**kwargs``.
(self, s, *args, **kwargs)
| 375 | self._remove_proxy(sig, proxy) |
| 376 | |
| 377 | def process(self, s, *args, **kwargs): |
| 378 | """ |
| 379 | Process signal *s*. |
| 380 | |
| 381 | All of the functions registered to receive callbacks on *s* will be |
| 382 | called with ``*args`` and ``**kwargs``. |
| 383 | """ |
| 384 | if self._signals is not None: |
| 385 | _api.check_in_list(self._signals, signal=s) |
| 386 | for ref in list(self.callbacks.get(s, {}).values()): |
| 387 | func = ref() |
| 388 | if func is not None: |
| 389 | try: |
| 390 | func(*args, **kwargs) |
| 391 | # this does not capture KeyboardInterrupt, SystemExit, |
| 392 | # and GeneratorExit |
| 393 | except Exception as exc: |
| 394 | if self.exception_handler is not None: |
| 395 | self.exception_handler(exc) |
| 396 | else: |
| 397 | raise |
| 398 | |
| 399 | @contextlib.contextmanager |
| 400 | def blocked(self, *, signal=None): |