> -----Original Message----- > From: Scott, Sean > > -1 on mutex/wait approach. > > > > Using that we would reinvent the wheel. > > > > There is an excellent API in the APR-UTILS that will allow > us to do a > > non-blocking approach. > > Take a look at apr_reslist API. > > Since we agreed to use the apr _and_ apr_util as mandatory, take a > > Being fairly new to this list... does this mean that you plan > on doing away with the jk wrappers? Is apr fair game in any module? >
Seems that I miss you here... > > look at those. The reslist is meant to be used for such purposes. > > > > MT. > > These methods do in fact do the functionality that I require, > however it doesnt appear that it is possible to achieve the > current behavior which is to error out when the > max_connections have been reached. However, I dont think > returning an error is desirable behavior anyway. > That true. Unfortunately the reslist doesn't have the acquire timeout. That is the reason that I didn't try to implement that by myself. There is apr_queue api that has the trypop call returning APR_EAGAIN if there is no free entries. The only drawback is that this is static list giving the fixed number of connections. What we want is the initial number of connections with the peek limit, and that is what apr_reslist provides. If we persuade the apr guys to add the timeout option to apr_reslist, it would satisfy all our needs. I have a pending apr patch that resolves that issue, so hopefully this will get committed. If that doesn't pass (knowing how fast the guys are :-), we can simply duplicate the apr_reslist code using apr_thread_cond_timedwait with configurable timeout, where the value of zero would immediately return the server_busy. MT. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]