Seeker
Seeker

Reputation: 572

How to get Worker from the IOmniTaskControl?

Is it possible to get the Worker object from a task handle of the type IOmniTaskControl? For example, on a terminate event, I want to log details of which worker was affected.

Upvotes: 0

Views: 181

Answers (1)

gabr
gabr

Reputation: 26850

IOmniTaskControl doesn't provide such functionality.

When you create new task, add its implementor and the IOmniTaskControl reference to some list/dictionary and then in OnTerminate look into that list/dictionary. (And don't forget to remove that entry from the list/dictionary or task controller won't be destroyed as the list/dictionary would keep a reference to it.)

Upvotes: 0

Related Questions