Community
cancel
Showing results for 
Search instead for 
Did you mean: 
derbai
Beginner
100 Views

Scheduling a timeout

Jump to solution
Is it possible within tbb to schedule a task to run at a specific time, and/or potentially to tun every x seconds?
I'm ideally looking for this to trigger a tbb_pipeline to run.
If not, how might this be accomplished?
0 Kudos
1 Solution
jimdempseyatthecove
Black Belt
100 Views
Quoting - derbai

I would ideally like to do processing at various times of the day.
One example of this would be to an ftp site every hour, download files, parse files etc etc

Qt and ACE offer this functionality within their schedulers, and I was hoping Tbb would do something similar.


while(WaitOneHourOrTerminate())
{
// create TBB working set
...
// distroy TBB working set
}

View solution in original post

6 Replies
Alexey_K_Intel3
Employee
100 Views
Quoting - derbai
Is it possible within tbb to schedule a task to run at a specific time, and/or potentially to tun every x seconds?
I'm ideally looking for this to trigger a tbb_pipeline to run.
If not, how might this be accomplished?

No there is no way to control behavior of TBB tasks like you described.

What exactly do you try to achieve? I.e. why starting pipelines run at specified times?
pvonkaenel
New Contributor III
100 Views

No there is no way to control behavior of TBB tasks like you described.

What exactly do you try to achieve? I.e. why starting pipelines run at specified times?

I guess one approach could be to create a standard thread using the tbb::tbb_thread class. You could have it wake up on whatever your schedule is and kick off a bunch of tasks or a pipeline.

Peter
derbai
Beginner
100 Views

No there is no way to control behavior of TBB tasks like you described.

What exactly do you try to achieve? I.e. why starting pipelines run at specified times?

I would ideally like to do processing at various times of the day.
One example of this would be to an ftp site every hour, download files, parse files etc etc

Qt and ACE offer this functionality within their schedulers, and I was hoping Tbb would do something similar.

Alexey_K_Intel3
Employee
100 Views
Quoting - derbai
I would ideally like to do processing at various times of the day.
One example of this would be to an ftp site every hour, download files, parse files etc etc

Qt and ACE offer this functionality within their schedulers, and I was hoping Tbb would do something similar.


No TBB does not have such a functionality, sorry. TBB is not a general-purpose framework but a computational parallelism oriented library. I guess you might be able to combine it with general purpose frameworks though, using it at levels when you would benefit from parallel computation on multicore systems.
robert_jay_gould
Beginner
100 Views
Quoting - pvonkaenel

I guess one approach could be to create a standard thread using the tbb::tbb_thread class. You could have it wake up on whatever your schedule is and kick off a bunch of tasks or a pipeline.

Peter

I second this approach, it's easy and does the job without adding dependencies.
jimdempseyatthecove
Black Belt
101 Views
Quoting - derbai

I would ideally like to do processing at various times of the day.
One example of this would be to an ftp site every hour, download files, parse files etc etc

Qt and ACE offer this functionality within their schedulers, and I was hoping Tbb would do something similar.


while(WaitOneHourOrTerminate())
{
// create TBB working set
...
// distroy TBB working set
}

View solution in original post

Reply