[Insight-developers] itkSTLThreadTest

Brad King brad . king at kitware . com
Tue, 19 Aug 2003 15:47:21 -0400 (EDT)


Hello,

I just looked at this test failure as promised during today's TCON.  It
looks like someone added some code for coverage that was causing the test
to fail.  Specifically:

  int threadId = threader->SpawnThread(itkSTLThreadTestImpl::Runner, results);
  std::cout << "SpawnThread(itkSTLThreadTestImpl::Runner, results): " << threadId << std::endl;
  int threadId2 = 1;
  threader->TerminateThread(threadId2);

The call to TerminateThread hard-coded the thread id to 1 and ignored the
value returned by SpawnThread.  This causes timeouts/crashes on different
platforms since thread 1 may or may not exist or be the thread created by
the SpawnThread method.  I've committed a fix to CVS.  We'll see how it
looks on tonight's dashboard.

-Brad