You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modules-dev@httpd.apache.org by Pooja Maheshwari <po...@impetus.co.in> on 2009/02/13 11:33:18 UTC

Regarding Multithreading in apache modules

Hi all,

Is it possible to use multithreading in apache modules written in C? As I searched, apr_thread_proc provides process & thread management functions. Does it come as part of Apache 2.2?

Thanks,
Pooja



________________________________
* Meet us at Hall 2/Booth 2C111 at the Mobile World Congress, Barcelona, Feb 16-19, 2009.
* Attend the qLabs webinar on Test Case Prioritization on Feb 20, 2009. Visit www.impetus.com for details.

Impetus is the winner of the Economic Times Intel Smart Workplace Awards 2008 and the CNBC emerging India 2008.

NOTE: This message may contain information that is confidential, proprietary, privileged or otherwise protected by law. The message is intended solely for the named addressee. If received in error, please destroy and notify the sender. Any use of this email is prohibited when received in error. Impetus does not represent, warrant and/or guarantee, that the integrity of this communication has been maintained nor that the communication is free of errors, virus, interception or interference.

Re: Regarding Multithreading in apache modules

Posted by Sorin Manolache <so...@gmail.com>.
On Fri, Feb 13, 2009 at 11:59, Pooja Maheshwari
<po...@impetus.co.in> wrote:
> Hi Sorin,
>
> Thanks for the prompt response. So is it possible to create new threads and do my custom tasks in parallel? Do you have any useful pointers to working with apr_thread_proc?
>
> I have a doubt that using multithreading inside apache module, which is itself part of an apache main process thread could be much beneficial? The module I intend to write is basically for generating log files using the client side data sent as part of the request. This data is going to be of uniform size mostly.

I do not really understand your problem and your need to use threads.
Why not hook log_transaction for your purpose?

S
>
> -----Original Message-----
> From: Sorin Manolache [mailto:sorinm@gmail.com]
> Sent: Friday, February 13, 2009 4:21 PM
> To: modules-dev@httpd.apache.org
> Subject: Re: Regarding Multithreading in apache modules
>
> On Fri, Feb 13, 2009 at 11:33, Pooja Maheshwari
> <po...@impetus.co.in> wrote:
>> Hi all,
>>
>> Is it possible to use multithreading in apache modules written in C?
>
> Yes.
>
>> As I searched, apr_thread_proc provides process & thread management functions. Does it come as part of Apache 2.2?
>
> Yes.
>
> Apache itself uses threads to serve requests if it is configured to
> use the mpm_worker module.
>
> S
>
> --
> A: Because it reverses the logical flow of conversation.
> Q: Why is top-posting frowned upon?
> A: Top-posting.
> Q: What is the most annoying thing in e-mail?
>
> * Meet us at Hall 2/Booth 2C111 at the Mobile World Congress, Barcelona, Feb 16-19, 2009.
> * Attend the qLabs webinar on Test Case Prioritization on Feb 20, 2009. Visit www.impetus.com for details.
>
> Impetus is the winner of the Economic Times Intel Smart Workplace Awards 2008 and the CNBC emerging India 2008.
>
> NOTE: This message may contain information that is confidential, proprietary, privileged or otherwise protected by law. The message is intended solely for the named addressee. If received in error, please destroy and notify the sender. Any use of this email is prohibited when received in error. Impetus does not represent, warrant and/or guarantee, that the integrity of this communication has been maintained nor that the communication is free of errors, virus, interception or interference.
>



-- 
A: Because it reverses the logical flow of conversation.
Q: Why is top-posting frowned upon?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

RE: Regarding Multithreading in apache modules

Posted by Pooja Maheshwari <po...@impetus.co.in>.
Hi Sorin,

Thanks for the prompt response. So is it possible to create new threads and do my custom tasks in parallel? Do you have any useful pointers to working with apr_thread_proc?

I have a doubt that using multithreading inside apache module, which is itself part of an apache main process thread could be much beneficial? The module I intend to write is basically for generating log files using the client side data sent as part of the request. This data is going to be of uniform size mostly.

Thanks,
Pooja

-----Original Message-----
From: Sorin Manolache [mailto:sorinm@gmail.com]
Sent: Friday, February 13, 2009 4:21 PM
To: modules-dev@httpd.apache.org
Subject: Re: Regarding Multithreading in apache modules

On Fri, Feb 13, 2009 at 11:33, Pooja Maheshwari
<po...@impetus.co.in> wrote:
> Hi all,
>
> Is it possible to use multithreading in apache modules written in C?

Yes.

> As I searched, apr_thread_proc provides process & thread management functions. Does it come as part of Apache 2.2?

Yes.

Apache itself uses threads to serve requests if it is configured to
use the mpm_worker module.

S

--
A: Because it reverses the logical flow of conversation.
Q: Why is top-posting frowned upon?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

* Meet us at Hall 2/Booth 2C111 at the Mobile World Congress, Barcelona, Feb 16-19, 2009.
* Attend the qLabs webinar on Test Case Prioritization on Feb 20, 2009. Visit www.impetus.com for details.

Impetus is the winner of the Economic Times Intel Smart Workplace Awards 2008 and the CNBC emerging India 2008.

NOTE: This message may contain information that is confidential, proprietary, privileged or otherwise protected by law. The message is intended solely for the named addressee. If received in error, please destroy and notify the sender. Any use of this email is prohibited when received in error. Impetus does not represent, warrant and/or guarantee, that the integrity of this communication has been maintained nor that the communication is free of errors, virus, interception or interference.

Re: Regarding Multithreading in apache modules

Posted by Sorin Manolache <so...@gmail.com>.
On Fri, Feb 13, 2009 at 11:33, Pooja Maheshwari
<po...@impetus.co.in> wrote:
> Hi all,
>
> Is it possible to use multithreading in apache modules written in C?

Yes.

> As I searched, apr_thread_proc provides process & thread management functions. Does it come as part of Apache 2.2?

Yes.

Apache itself uses threads to serve requests if it is configured to
use the mpm_worker module.

S

-- 
A: Because it reverses the logical flow of conversation.
Q: Why is top-posting frowned upon?
A: Top-posting.
Q: What is the most annoying thing in e-mail?