[ssc-devel] PASS-BARRIER/TIMEOUT is not useful.

Marco Monteiro masm at acm.org
Sat Aug 5 08:37:03 UTC 2006


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



More information about the Ssc-devel mailing list