def __enter__(self):
        # Only use unix_signal_add if this is not win32 and there has
        # not already been one.
        if sys.platform != 'win32' and not InterruptibleLoopContext._loop_contexts:
            # Add a glib signal handler
            source_id = GLib.unix_signal_add(
                GLib.PRIORITY_DEFAULT, signal.SIGINT, self._glib_sigint_handler, None
            )
            InterruptibleLoopContext._signal_source_id = source_id

        InterruptibleLoopContext._loop_contexts.append(self)