Details
-
Bug
-
Status: Closed
-
Critical
-
Resolution: Done
-
None
-
None
-
Medium
Description
What happens:
Thread 1 creates a stateful session and spawns daemon Thread 2 (with the correct TCCL).
Thread 2 calls fireUntilHalt() on the stateful session, which suspends that Thread.
Thread 3 calls halt() on the stateful session, which will cause Thread 2 to stop once all the rules have finished firing, however returns immediately.
Thread 3 calls dispose() on the stateful session, but the rules might not have finished firing. This could cause unpredictable results.
What needs to happen:
Thread 1 creates a stateful session and spawns daemon Thread 2 (with the correct TCCL).
Thread 2 calls fireUntilHalt() on the stateful session, which suspends that Thread.
Thread 3 calls halt() on the stateful session, which will cause Thread 2 to stop once all the rules have finished firing, however returns immediately.
Thread 3 calls join() on Thread 2, which will return once all the rules have finished firing and Thread 2 is done.
Thread 3 calls dispose() on the stateful session safely, as now the rules have finished firing. This means predictable results.