Mladen Turk
Mon, 21 Jul 2008 04:02:53 -0700
Sander Striker wrote:
Using pre_cleanup for some objects that presumably have child pools can resolve some of those issues, but it definitely needs a thorough evaluation. Comments?More a question: what is the actual proposal?
Well I thought to add some sort of API that would allow to register a callback list to parent object callback. Using socket API for example that would allow listening socket to have some sort of info about all accepted sockets. Right now socket_cleanup simply closes the socket, but in this case it would also sweep trough all registered child sockets and execute provided cleanup for each of them. The callback code can be as simple as 'hey I'm dead' flag, or a full blown notify/wait mechanism. This is basically extending the pool_cleanup_register to any object by creating the cleanup chain for each cleanup callback (in pre_cleanup). However the idea might not work at the first place :) Regards -- ^(TM)