Amplifier Error: Unable to handle the thread termination correctly!

Amplifier Error: Unable to handle the thread termination correctly!

I am testing some code that I have parallelized for areas that use too synchronization, to see if I can improve program overall performance

I terminate eachprogram run with a Control + Break in the Command Window that contains the output messages generated by the Service program I am testing - This output window is present only fordebugging/testing

The inspector appear to handle this type of execution termination correctly (Memory + Threads) at any Level
The amplifier reports the above message at every run + termination.

Q1: Do Ineed to worry about this message, since it is considered an ERROR and not a WARNING?
Q2: I am not sure the erroris even triggered by my termination method - Can you comfirm?
Q3: Which thread is ?-Each of mythreads have been named, so the amplifier could tell me something else
Q4: Is there a better way than other toterminate each thread? - All my threads wait for a shutdown event to exit

FYI: The program uses no TBB or OpenMP, but standard threads created via _beginthreadex function
This is old legacy code and the program that has evolved with time - 7 years

Thanks
Sal

2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

A1. Yes. This is not right way for terminating threads. The threads should not be terminated at all. They should be ended up with exiting their thread functions.

A2. The error was triggered by the termination method.

A3. By Ctrl+Break you are terminating the whole process. So, all threads are terminated. What is the reason for telling which thread is being terminated?

A4. I think it's better to intercept the interruption gracefully and set a synchronization event for exiting the thread functions.

-Vladimir

Leave a Comment

Please sign in to add a comment. Not a member? Join today