Thread safety..
nishant kumar <[email protected]>
| Newsgroups | gmane.text.xml.rpc.specification |
|---|---|
| Message-ID | <[email protected]> |
//serv.c
//---------------------------------
int HA_SERVER;
xmlrpc_value *method_1(){}
xmlrpc_value *method_2(){}
int
main(void)
{
/*only place, in whole server,where the HA_SERVER is
set to 1(one) */
HA_SERVER=1;
xmlrpc_server_abyss_add_method("name1",method_1,...);
xmlrpc_server_abyss_add_method("name2",method_2,...);
xmlrpc_abyss_server_run();
}
---------------------
Now in this whole server code i change the HA_SERVER
flag only once at the place as you can see....
But when abyss server creates new thread (after max
connections on a presistent socket are reached) this
flag again sets to 1.
HA_SERVER being a global variable I understand that it
should be thread safe ...but then again...I am
changing this at a place where the future threads
doesnt start execution , so then why HA_SERVER is
changing to 1.
regards
Nish
__________________________________________________________
Yahoo! India Answers: Share what you know. Learn something new
http://in.answers.yahoo.com/
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/xml-rpc/
<*> To unsubscribe from this group, send an email to:
[email protected]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/