On Mon, Jun 5, 2017 at 4:32 PM, William A Rowe Jr <wr...@rowe-clan.net> wrote: > What happens if two different threads attempt this poll in parallel? I > presumed pollsets are copied to prevent two threads from clashing.
>> pollfds = apr_pcalloc(temp_pool, apr_hash_count(server_queries) * >> sizeof(apr_pollfd_t)); >> >> - rv = apr_pollset_create(&pollset, apr_hash_count(server_queries), >> temp_pool, 0); >> + rv = apr_pollset_create(&pollset, apr_hash_count(server_queries), >> temp_pool, >> + APR_POLLSET_NOCOPY); Looks kosher, the pollfds that will be added to this pollset have the same lifetime / same pool (beginning of the diff context), and the pollset does not escape this function.