Showing results for 
Search instead for 
Did you mean: 

My application doesn't work with HT enabled

I have an application that is multithreaded. It is running fine on all non-HT computers. I just got a brand new Toshiba Satellite P20 3.2Ghz with HT and XP Home. I start the application and nothing happened. I look in Task Manager and my application is not listed in the Applications tab but it is present in the Processes tab. I disabled HT in the Bios, start the application and everything is fine.
What is going on?
Is there a list of functions of the Windows API that are known to cause problems with HT so that I can check if I'm using them?
Is there a way to force my application to NOT use HT? I tried to set the compatibility of my executable to Windows 98, but this cause other problems. I can't use the SetThreadAffinityMask because some of the threads are created by Third party components I'm using.

I can't use ThreadChecker because my application is made in Delphi. Is there any known bugs with application compiled with Delphi and HT?

Any help will be greatly appreciated.


0 Kudos
3 Replies
Black Belt

Michael -

Sorry to hear you're having such bad luck with Hyper-Threading.

One resource for advice and information would be the IDS Hyper-Threading page under Software Technologies:Threading (

I'm not aware of any specific API functions that won't work with Hyper-Threading. The logical processor allows the operating system to schedule tasks from two thread that make the most use of the available processing resources. This interleaving of threads may be catching an error in the application that is not evident when the threads are sharing a single processor. Have you tried running your application on a dual-processor system to see how this may affect your application?

From your description, I would guess that you havea deadlock situation that is only evident when two threads are allowed to run at the same time. I've tested threaded codes on my development machine and seen no problems only to find major errors crop up when I use a different execution platform that runs the threads in a slightly different order. If you're using multiple locks, or other synchronization objects, be sure that threads are always accessing them in a consistent way. A debugger may be able to locate where the code is stalling (assuming that it does get started), or it might also cover up the problem by altering the timing to be more like a single processor.

-- clay

New Contributor I

I can't use ThreadChecker because my application is made in Delphi. Is there any known bugs with application compiled with Delphi and HT?

HT is revealing that a lot of programmersdid not have aclue on how to code correct, thread-safe code.


Black Belt

lockfree -

Yep, and I'm afraid that it will only get worse before it gets better. Which is why we have this Threading Forum and appreciate when readers post tips and tricks on how to do things right or better; things like using lock-free methods. :smileywink:

-- clay