Skip Menu |

This queue is for tickets about the POE CPAN distribution.

Report information
The Basics
Id: 6263
Status: rejected
Priority: 0/
Queue: POE

Owner: Nobody in particular
Requestors: rcaputo [...]

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)

Date: Sun, 9 May 2004 11:49:12 -0400
From: Rocco Caputo <rcaputo [...]>
To: bug-POE [...]
Subject: early vs. late resource initialization
Download (untitled) / with headers
text/plain 1.3k
POE resources are initialized very early. It happens during POE::Kernel construction, which comes at C<use POE> time. Part of the initialization involves setting up signal handlers. This is going away soon, but it illustrates a potentially widespread problem with POE's initialization. Other modules loaded after POE may rely on certain %SIG behaviors. They may set various signal handlers themselves or "helpfully" set them to DEFAULT. In doing so, they clobber the %SIG watchers POE has set up. Randal suggested moving signal initialization to run() time. I pointed out that it would break (or at least make inconsistent) the current resource initialization plan. Nevertheless, the signal problem sets precedent for the need for late resource initialization. It was pointed out that early initialization is vital for certain resources. $poe_kernel methods can be called before run(), so data structures must be prepared for use before that. The most obvious solution seems to be breaking POE::Resource initialization into early and late phases. The early phases run at load time, to prepare for pre-run() calls, and the late phases initialize underlying system things (like signal handlers, maybe threads or something) so they'll run properly. This message relates to internal implementation. No user-serviceable APIs are harmed in its making, so I bypassed the mailing list. -- Rocco Caputo
Download (untitled) / with headers
text/plain 151b
YDNI. Besides, I think signal initialization's changed two or three times since the idea came up. If it's important or relevant, it'll come up again.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to