httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Bligh <>
Subject [users@httpd] Thread safety for modules
Date Sat, 08 Sep 2012 21:52:29 GMT
I have a module with two threads running under MPM worker on Apache 2.2.

Is it safe for one thread 1 to call:
  ap_filter_t *of = r->connection->output_filters;
  ap_fwrite(of, …. );
  ap_fflush(of, …..);

whilst thread 2 is calling:
  bb = apr_brigade_create(r->pool, r->connection->bucket_alloc);
  ap_get_brigade(r->input_filters, bb, AP_MODE_READBYTES, APR_BLOCK_READ, 
  apr_brigade_flatten(bb, buffer, &bufsiz) ...

IE can both threads work on different bucket brigades associated with the 
same rec? I think the answer to this is yes.

Alex Bligh

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message