Inside of go.php I have a function called doSomethingCrazy().
My go.php file gets a lot of requests, but I want to ensure that doSomethingCrazy() will only be running in up to 5 concurrent requests.
In other words, I'd like to write some kind of "manager" that would check to see if doSomethingCrazy() is already in use by 5 other php threads. If so, I do not want to call doSomethingCrazy().
Are there any types of thread managers or pool connection managers or something I can use to help throttle access to this resource?
Thank you,
Jon