Testing and concurrency
Luís Oliveira
luismbo at gmail.com
Fri Mar 14 17:16:13 UTC 2014
On Fri, Mar 14, 2014 at 3:57 PM, Eli Naeher <enaeher at gmail.com> wrote:
> Recently I've begun writing tests which need to do things in several
> threads. I'm curious as to what approaches other people have taken when
> doing this, and whether any of the CL test frameworks address this situation
> specifically.
I don't have much experience with lparallel yet, but I think it
provides the building blocks you're looking for.
> - detecting, handling, and reporting conditions that are raised in threads
> other than the main test/reporting thread
http://lparallel.org/handling/
> - ensuring that the main test thread waits for the other threads before
> checking for the correct results (and before returning)
http://lparallel.org/promises/ (or possibly other constructs depending
on your concrete use case)
> - forcing things in different threads to happen at the same time (I've been
> using SBCL's timers for this)
Queues or channels might help here.
HTH,
--
Luís Oliveira
http://kerno.org/~luis/
More information about the pro
mailing list