Am 21.09.2014 17:02, schrieb Luís Marques:

On Thu, 18 Sep 2014 18:08:55 +0200, Sönke Ludwig wrote:

Ah okay, that's because Ctrl+C basically triggers a call to
exitEventLoop, but while the module constructors are still run, there
is no event loop running, yet - only a temporary implicit event loop for
each blocking operation.

The question is what would be the best thing to do. Throw an
InterruptException or simply call exit(-2) - or anything else?

How does exitEventLoop implement the interruption of the normal event loop? (outside the module ctors)

It uses the event loop implementation specific mechanism - for libevent
that is event_base_loopbreak and for Win32 it's a WM_QUIT message.