Re: Thread safety for modules

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

 



Oops

--On 8 September 2012 22:52:29 +0100 Alex Bligh <alex@xxxxxxxxxxx> wrote:

I have a module with two threads running under MPM worker on Apache 2.2.

That should have read mpm-prefork

Alex

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,
bufsiz)
  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





--
Alex Bligh

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx




[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux