[concurrency-interest] Request for feedback -- Bill/Brian/Cliff JavaOne talk

Oliver Zeigermann oliver at zeigermann.de
Tue Apr 10 08:21:38 EDT 2007


That's pretty cool. Any place where I can get the source?

Cheers

Oliver

2007/4/10, Peter Veentjer <alarmnummer at gmail.com>:
> > I can understand them, and see where they might be useful for
> > somethings. The nice thing about the tick counter
> > in MultithreadedTestCase is that it works very well for the case
> > where you expect a thread to block and you want
> > to verify that it does block.
>
> I have created threads and runnable's that can be asked for the state
> they are in, and how they have exited:
>
> example usage:
>
> BlockingThread waitThread = scheduleWait(somelock,somecondition);
> sleepMs(SMALL_DELAY);
> waitThread.assertIsWaiting();
>
> Thread signalThread = scheduleNotify(somelock,somecondition);
> joinAll(signalThread,waitThread);
> waitThread.assertIsFinished();
>
> And the joinAll method joins on thread with a timeout, so a unittest
> won't stall indefinitely.
>


More information about the Concurrency-interest mailing list