[Catalyst] Re: PATCH: refactor Catalyst::Engine::HTTP::Restarter to standalone module

Nilson Santos Figueiredo Junior acid06 at gmail.com
Wed Jul 25 21:57:26 GMT 2007


On 7/24/07, Matt S Trout <dbix-class at trout.me.uk> wrote:
> Any chance you could comment on the bit of the thread where signal-like
> solutions for win32 were discussed instead of repeating the bit of the
> conversation we already went past a day ago?

Of course (I assume you're talking about Ash Berlin's reply).

Using Windows messages from Perl is clunky and would involve using XS
code. And, even then, I'm not sure if it's possible at all without
hacking perl itself. The message processing queue is probably either
handled by perl itself or not handled at all. In both cases, I have no
idea how it would be possible to interrupt the currently executing
code when a message arrives without special hooks on the perl
interpreter itself.

If perl is ever going to fully emulate signals under Win32, using
messages is probably the way to do it. But I'm not sure if it's
possible to do that without modifying the interpreter.

Note that, even then, it wouldn't be simple because Windows messages
don't invoke a callback on arrival. They just sit on a queue waiting
for the application to dequeue them and act accordingly. I think
they're more like X Window Events than signals. They're used for all
sorts of things such as requesting a window to be repainted, sending a
key stroke or mouse event, for IPC (and for communication between
threads) and probably for a lot more.

-Nilson Santos F. Jr.



More information about the Catalyst mailing list