The ThreadingExample.java and associated files are intended
show and hopefully help someone fix an issue I am having
with Drools 4.0 (both 4.0.1 and 4.0.2).

The files should be extracted into the
drools-examples-drl directory and follow the packaging concepts
of the rest of the examples.

I am currently getting output like the following when running this 
example.

Thread[Thread-0] run completed.
Thread[Thread-1] run completed.
Thread[Thread-2] run completed.
Thread[Thread-3] run completed.
Thread[Thread-4] run completed.
Thread[Thread-0] completed and was removed from list.
Thread[Thread-1] completed and was removed from list.
Thread[Thread-2] completed and was removed from list.
Thread[Thread-3] completed and was removed from list.
Thread[Thread-4] completed and was removed from list.
Thread[main] synchronized version of test completed.  There should be no error output above!
ERROR Thread[Thread-9] occurrence[90] currentCount[8] newCount[2] correctAnswer[1]
ERROR Thread[Thread-9] occurrence[230] currentCount[22] newCount[0] correctAnswer[1]
ERROR Thread[Thread-9] occurrence[240] currentCount[23] newCount[2] correctAnswer[1]
ERROR Thread[Thread-7] occurrence[370] currentCount[36] newCount[0] correctAnswer[1]
ERROR Thread[Thread-5] occurrence[580] currentCount[57] newCount[0] correctAnswer[1]
ERROR Thread[Thread-8] occurrence[600] currentCount[59] newCount[0] correctAnswer[1]
ERROR Thread[Thread-6] occurrence[750] currentCount[74] newCount[0] correctAnswer[1]
ERROR Thread[Thread-6] occurrence[760] currentCount[75] newCount[0] correctAnswer[1]
ERROR Thread[Thread-9] occurrence[600] currentCount[59] newCount[0] correctAnswer[1]
ERROR Thread[Thread-6] occurrence[780] currentCount[77] newCount[0] correctAnswer[1]
ERROR Thread[Thread-9] occurrence[620] currentCount[61] newCount[0] correctAnswer[1]
ERROR Thread[Thread-6] occurrence[930] currentCount[92] newCount[0] correctAnswer[1]
Thread[Thread-5] run completed.
ERROR Thread[Thread-8] occurrence[870] currentCount[86] newCount[0] correctAnswer[1]
Thread[Thread-6] run completed.
ERROR Thread[Thread-7] occurrence[930] currentCount[92] newCount[0] correctAnswer[1]
Thread[Thread-5] finished and remove from list.
Thread[Thread-6] finished and remove from list.
Thread[Thread-7] run completed.
Thread[Thread-8] run completed.
Thread[Thread-9] run completed.
Thread[Thread-7] finished and remove from list.
Thread[Thread-8] finished and remove from list.
Thread[Thread-9] finished and remove from list.
Thread[main] completed.  There should be no other output!

Please feel free to incorporate this code into the examples if you wish.  And
any help on getting what I am doing incorrectly or a fix would be appreciated.

Thanks.
Tate Moore
tate.moore@gorillalogic.com

