>>> On 2/25/2009 at 8:39 AM, in message <b9aec8265e202d4ba6540ea32f49579007daf...@ldnpcmeu301veua.intranet.barcapint.com , <daniel.poc...@barclayscapital.com> wrote:
> > Is there any harm in using APR_POLLSET_THREADSAFE in the call to > apr_pollset_create in gmond.c? > > apr_pollset_create(&listen_channels, total_listen_channels, > global_context, 0); > > becomes... > > apr_pollset_create(&listen_channels, total_listen_channels, > global_context, APR_POLLSET_THREADSAFE); > > gmond doesn't create any threads by default, but some metric > implementations or other code may be threaded. > > Without this, I noticed my application behaving badly when another > thread tried to independently make a HTTP request through libcurl. > > The docs say that the flag only affects concurrent access to the pollset > being created, but I suspect it may have a wider impact on APR thread > safety. > > http://apr.apache.org/docs/apr/1.3/group__apr__poll.html#g4ca4056a19daee > 8fe94ddba100fe2326 > I would probably agree with you that adding this to apr_pollset_create() probably has no affect. Since gmond is not threaded, I'm not sure it is helps out any other situation either. Even though other modules might create threads, none of them call back into the gmond code that is polling. So making pollset thread safe, I think is basically meaningless. Brad ------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H _______________________________________________ Ganglia-developers mailing list Ganglia-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ganglia-developers