Intel® oneAPI Threading Building Blocks
Ask questions and share information about adding parallelism to your applications when using this threading library.
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.

Scheduling a timeout

derbai
Beginner
244 Views
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
244 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
244 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
244 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
244 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
244 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
244 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
245 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
}
Reply