On 25/06/2012, Cyril Sochor <cyril.sochor(a)gmail.com> wrote:
Hi,
I created two issues in bugtracker, second one with pull request.
JBRULES-3528 Deadlock when using pseudo session clock
PseudoClockScheduler is not in the stable API and not too well documented.
There is no point in running a session with a pseudo-clock in one
thread and doing inserts and clock advances in another one.
The straightforward
for (int stIndex = 1; stIndex <= 10; stIndex++) {
clock.advanceTime(20, TimeUnit.SECONDS);
kSession.insert( new StockTick( stIndex, "RHT", 100 * stIndex, 1000 ) );
kSession.fireAllRules();
}
does what you want.
-W