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.

task_scheduler_observer

pirlillo
Beginner
128 Views
Hello,

I am trying to observe my threads. An some extrange this ocurrs.

I do a task_scheduler_init with 8 threads.

I have a task_scheduler_observer class where the entry methods prints the ID of each treads.

then, I spawns some task and I start the executing spawnning or recycling different tasks.

When the first task is spawned the threads go to the entry methods a print its ID. However in the middle of the execution (the execution lates several minutes) a new threads (the 9th threads) go to the entry methods.

It coul be like a new threads. However, in the system (using command "top") I can see always eight threads. I think one threads dies or somethin similar and a new threads is created. However, no thread go to exit method of the task_scheduler_observer...

Any Idea???

I would like to control all the threads because I want to use PAPI to measure some counters.

Thank you.
0 Kudos
1 Reply
Anton_M_Intel
Employee
128 Views
please try limitting scope of your task_scheduler_init instance and wait some time after it is destroyed to receive delayed exit notifications
Reply