RE: [PATCH] mod_jk 1.2.0 workers pool

2002-06-21 Thread Mladen Turk



> -Original Message-
> From: GOMEZ Henri [mailto:[EMAIL PROTECTED]] 
> Sent: 21. lipanj 2002 13:44
> To: Tomcat Developers List
> Subject: RE: [PATCH] mod_jk 1.2.0 workers pool
> 
> 
> sleep(#seconds)
> 
> or 
> 
> usleep(#microseconds)
>

The it should be usleep (1);
 
> No the real problem is with using a sleep in
> network code, I didn't like it. 
> 

Well I have a loop that waits that one of the ajp workers sets its
is_busy flag to 0. Without the sleep you have a thread lock. If the code
would run only on WIN32, then I would use the WaitForMultipleObjects,
but since I don't know the unix pthreads that thorowly, the sleep is the
simplest solution I've think of (signals perhaps).


MT.


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: [PATCH] mod_jk 1.2.0 workers pool

2002-06-21 Thread GOMEZ Henri

sleep(#seconds)

or 

usleep(#microseconds)

No the real problem is with using a sleep in
network code, I didn't like it. 

-
Henri Gomez ___[_]
EMAIL : [EMAIL PROTECTED](. .) 
PGP KEY : 697ECEDD...oOOo..(_)..oOOo...
PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6 



>-Original Message-
>From: Mladen Turk [mailto:[EMAIL PROTECTED]]
>Sent: Friday, June 21, 2002 1:38 PM
>To: 'Tomcat Developers List'
>Subject: RE: [PATCH] mod_jk 1.2.0 workers pool
>
>
>> 
>> I started take a look at patches, 
>> but I didn't like the Sleep(10).
>> 
>> Why did you put a Sleep only in Windows case ?
>> 
>
>Cause I don't know what is the actual function call on unix :)
>
>
>
>--
>To unsubscribe, e-mail:   
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: 
><mailto:[EMAIL PROTECTED]>
>
>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: [PATCH] mod_jk 1.2.0 workers pool

2002-06-21 Thread Mladen Turk

> 
> I started take a look at patches, 
> but I didn't like the Sleep(10).
> 
> Why did you put a Sleep only in Windows case ?
> 

Cause I don't know what is the actual function call on unix :)



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




RE: [PATCH] mod_jk 1.2.0 workers pool

2002-06-21 Thread GOMEZ Henri

I started take a look at patches, 
but I didn't like the Sleep(10).

Why did you put a Sleep only in Windows case ?

-
Henri Gomez ___[_]
EMAIL : [EMAIL PROTECTED](. .) 
PGP KEY : 697ECEDD...oOOo..(_)..oOOo...
PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6 



>-Original Message-
>From: Mladen Turk [mailto:[EMAIL PROTECTED]]
>Sent: Friday, June 21, 2002 1:24 PM
>To: [EMAIL PROTECTED]
>Subject: [PATCH] mod_jk 1.2.0 workers pool
>
>
>
>Think this solves a lot of problems (at least to my tests).
>Don't forget to add the worker.ajp13.poolsize=nn in the
>workers.properties (this is the actual number of workers  (connections)
>to the TC), the default is 1.
>
>This value should be close to the number of predicted client
>connections, or to the desired no of TC threads. (didn't done some
>serious profiling).
>
>How it works:
>
>At startup we create the nn workers, and the actual clients gets
>serialized through those workers (nothing fancy, just a safe
>multithreading I hope).
>
>Need in the jk_worker.c solution for:
>
>+#ifdef WIN32
>+Sleep(10);
>+#else
>+
>+#endif
>
>This is the loop that waits for a worker to finish serving request if
>non free has been found.
>
>That's it.
>
>MT.
>

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