Add a mechanism to limit the quantity of tests that can be run currently. This should be pretty easy for a single test runner, but if we want to expand it to be all test runners, it may be a little more complex.
At a high level: there is a semaphore that each test needs to take a permit from before it is allowed to run.
We can have an instance that is held by the caller of the library to holds an Arc<Semaphore> that each test runner pulls from to limit across runners. This is something to play around with.
Add a mechanism to limit the quantity of tests that can be run currently. This should be pretty easy for a single test runner, but if we want to expand it to be all test runners, it may be a little more complex.
At a high level: there is a semaphore that each test needs to take a permit from before it is allowed to run.
We can have an instance that is held by the caller of the library to holds an
Arc<Semaphore>that each test runner pulls from to limit across runners. This is something to play around with.