I am trying to run a fire-and-forget task - IOmniTaskControl.Unobserved
works well enough with either IOmniTaskControl.Run
or IOmniTaskControl.Schedule(IOmniThreadPool)
, but the IOmniTaskControl
object is never destroyed.
I am limited to using Unobserved
since I have an arbitrary number of tasks and I do not want to store them in a dedicated variable or a list - removing a task from that list would be a hustle in itself since it can only be done from the task body.
Am I missing something? I thought that IOmniTaskControl.Unobserved
will destroy itself after it runs.