[Insight-developers] ThreadedHalt
Paul Yushkevich
pauly2 at grasp . upenn . edu
Tue, 25 Nov 2003 16:32:39 -0500
Hello,
I have just checked in a small change to the FiniteDifferenceImageFilter
and some of its children. There was a problem with SNAP on
multiprocessor machines, and this was designed to help aleviate this
problem.
The problem was that SNAP does a "loopback" to the user interface in the
Halt method. In ParallelSparseLSFilter, however, Halt is called from
each of the threads, and that was causing major crashes. So I added a
ThreadedHalt method that takes as a parameter a ThreadInfoStruct *
disguised as a void *, so that I can check the current ThreadID in the
Halt method. The default implementation of ThreadedHalt is to call Halt,
so no user code needs to be changed.
So I just wanted to give a heads up, especially to Josh, since this is
his code.
Paul.