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

patch to throttle processes


hi,

I looked over the source tonight, and it looks like there was already a
synchronized block that prevented any given page from being compiled twice
at the same time, which is good.  But it doesn't place an upper limit on the
total number of compiler processes that could take place at any given time.

For most users this won't be an issue, but I think it's important to support
this.  I have attached a patch that addresses this.  It's an optional
feature, turned off by default, so folks who don't need it won't be affected
by it.

basically I added a new init argument called "maxcompileproc"  this should
be an int, and specifies the maximum number of compiler processes that can
take place at any time.  so you could set it to 1 and you'd be assured only
one compile process would occur at a time.

it uses wait()/notify() so the queueing is not fair, but other than that it
should work pretty well.

let me know if you think this is useful, and should be committed to CVS.

thanks,

-- James

Attachment: throttle.patch
Description: Binary data