Overview
Features
Download
Documentation
Community
Add-Ons & Services

TaskManager and Task

Please post support and help requests here.

TaskManager and Task

Postby panxpress » 14 Jun 2008, 16:35

Hi,

I have a basic question regarding the TaskManager and the Task run by it. From the documentation, it looks like, after the task is completed, TaskManager deletes the Task. Is there a way that the TaskManager does not delete the Task after it is completed.

Thanks,
panxpress
 
Posts: 7
Joined: 14 Jun 2008, 09:43

Re: TaskManager and Task

Postby alex » 15 Jun 2008, 15:32

>Is there a way that the TaskManager does not delete the Task after it is completed.

No. A Task will automatically notify the manager when runTask() completes and manager shall remove it from the list.

What you can do is:

* prevent it from completing by looping inside the runTask()

or

* give a duplicate to TaskManager~058~~058~start() to cause your task to outlive the run by manager and, after completion, start it again:

Code: Select all

TaskManager tm;
AutoPtr<SimpleTask> pTT = new SimpleTask;

tm.start(pTT.duplicate()); // send in duplicate
tm.joinAll(); // run to completion
tm.start(pTT.duplicate()); // start it again


HTH

Alex
alex
 
Posts: 1114
Joined: 11 Jul 2006, 16:27
Location: United_States

Re: TaskManager and Task

Postby panxpress » 15 Jun 2008, 23:45

Thanks a lot! I will give this a try. Still trying to get my hands wet with this. Poco looks to be very good.
panxpress
 
Posts: 7
Joined: 14 Jun 2008, 09:43


Return to Support

Who is online

Users browsing this forum: No registered users and 1 guest

cron