Context that records that we are in a signal handler.
()
| 61 | |
| 62 | @contextmanager |
| 63 | def in_sighandler(): |
| 64 | """Context that records that we are in a signal handler.""" |
| 65 | set_in_sighandler(True) |
| 66 | try: |
| 67 | yield |
| 68 | finally: |
| 69 | set_in_sighandler(False) |
| 70 | |
| 71 | |
| 72 | def logger_isa(l, p, max=1000): |