CfixCreateThread2 limited to 64 threads
Brought to you by:
passing
There appears to be a 64 thread limit on CfixCreateThread2 but it is not documented as such in http://www.cfix-testing.org/unit-testing-framework/windows/doc/CfixCreateThread2.html
I have a 32bit process that has a trivial thread proc - the test was creating 99 of them happily with the Win32 CreateThread. When I moved to using CfixCreateThread2, so I could use cfix functions in the thread procs, it only creates a max of 64 threads.
Using Visual Assert 1.1.0 Build 3780 with Visual Studio 2008 SP1 on WIndows7 x64.
That is correct, there is an upper limit of 64 threads. The reason for this is that cfix attempts to join all child threads spawned by a test case before it proceeds with the next test case. It does this using WaitForMultipleObject, which, of course, imposes a limit of 64 threads.
This limit could be circumvented, though.
(In case you are interested in fixing it yourself, I will happily accept a patch...)
A documentation change to warn people of the limit would be quite sufficient for me, just copy and paste your explanation above!
thanks for a great toolkit. I work for a multinational mining software company and am pushing for us to standardise on Visual Assert for our native code.