Previously, DummyStepLogic spawns a long-running thread that runs independently of the Grain thread. When the long-running job completes, it needs to update the Step status in the Grain. Doing so when the Grain has been de-activated will cause an access violation.
The solution is to use DirectClient support in Orleans and let the long running thread delegate schedule a grain call to set its status. _Call on the IStepGrain interface is introduced for this purpose.
Previously,
DummyStepLogic
spawns a long-running thread that runs independently of the Grain thread. When the long-running job completes, it needs to update the Step status in the Grain. Doing so when the Grain has been de-activated will cause an access violation.The solution is to use DirectClient support in Orleans and let the long running thread delegate schedule a grain call to set its status.
_Call
on theIStepGrain
interface is introduced for this purpose.