GMainLoop within apache



Hi there,

I'm writing a PHP binding for the libpurple (see more about it there 
http://pidgin.im/ and 
http://thinker.rubay.de/archives/20-PHPurple-v0.2-alpha-released.html). The 
libpurple makes hard use of glib and is based on the GMainLoop. 

Till now, each script using the binding must end with running the main loop 
and as I'm understanding this means - the apache process will be replaced 
with the main loops one. Additionally, the apache can run scripts using 
multithreading, which would cause the complete crash for other scripts, 
running in the same process in different threads. So, this all leads to the 
thing, that the extension may not be used within apachen enviropment (neither 
for php as module nor as cgi), because the result of something like thet 
would be unpredictable.

Studiing the glib docs "'ve found out, that it isn't necessary to start 
g_main_loop_new but the g_main_context_iteration can be used. Is this not the 
same thing? May g_main_context_iteration be invoked within a thread without 
crashing some other main loop. Is there a way to integrate the GMainLoop in 
some other main loop otherwise?

I'll be obliged for any clarity brought into this question.

Regards

Anatoliy


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]