Terminating child WorkItems

Topics: CAB & Smart Client Software Factory
Oct 11, 2005 at 8:48 PM
originally posted by: jwmc

Whenever I Terminate a child WorkItem the ThrowIfWorkItemTerminated method throws an exception upon exiting the application. Apparently the terminated child WorkItem is not removed from the LifetimeContainer and I can't call Remove on the WorkItems collection since it throws an exception too! How can one Terminate a WorkItem cleanly?
Oct 12, 2005 at 5:13 AM
originally posted by: BradWilsonMSFT

Thanks, sounds like a bug. We'll get this resolved for the final release.

As a work around, in WorkItem.Dispose(bool), replace:



if (Status == WorkItemStatus.Terminated)