I'm currently using pass-barrier/timeout heavily in the test suite. Apart from its use there, I can't see any use for it. Unless someone can think of an use for it, I think that it should be thrown out.
Any thoughts?
Cheers,
Marco
On Wed, Aug 02, 2006 at 10:26:20AM +0100, Marco Monteiro wrote:
I'm currently using pass-barrier/timeout heavily in the test suite. Apart from its use there, I can't see any use for it.
Anything that makes testing easier is probably worth keeping, even if it has no other use.
Could you post a URL for the test code in which it is useful? Currently I have no application requiring threads[1] so I can only attempt to contrive another useful case.
The first project on my "to do one day" list that might require threads probably only needs them because it may be network-bound.
Unless someone can think of an use for it, I think that it should be thrown out.
Any thoughts?
What is the cost of leaving it in? Or perhaps in an easier to answer form: across all likely implementations, what might be the average and maximum costs of leaving it in?
Alternatively, if you preferred to trim down to a core SSC spec and then offer an ssc-extra package in some cases, will this impact the usefulness of the spec? Is a programmer can't rely on functionality being present he's back to either rolling his own, pulling in a library or coding it up for some subset of vendors.
You may see these are generic comments, which might apply to anything else just as well...
Matthew #8-)
Matthew Astley wrote:
On Wed, Aug 02, 2006 at 10:26:20AM +0100, Marco Monteiro wrote:
I'm currently using pass-barrier/timeout heavily in the test suite. Apart from its use there, I can't see any use for it.
Anything that makes testing easier is probably worth keeping, even if it has no other use.
The function can be implemented in the test suite.
Could you post a URL for the test code in which it is useful? Currently I have no application requiring threads[1] so I can only attempt to contrive another useful case.
The test suite is in a Darcs directory: http://common-lisp.net/project/ssc/darcs/test There is a link in the project page. Right now it is not very useful, as there is no implementation to test.
What is the cost of leaving it in? Or perhaps in an easier to answer form: across all likely implementations, what might be the average and maximum costs of leaving it in?
If a function will never be used, then it should not be in the specification.
There is an equilibrium that must be maintained. Semaphores, barriers, and read/write locks can all be implemented with mutual exclusion locks and condition variables. They are included because they can benefit, in terms of performance, from being in the specification. If a function on one of these three objects (or any other) will never be used, it should not be in the specification.
Cheers,
Marco