[Insight-developers] itk::LightObject non-threaded

Ken Martin ken.martin@kitware.com
Fri, 5 Apr 2002 13:06:19 -0500


Hey Jim,

> ITK has pretty much followed the VTK pattern of instance
> level thread safety.  There is one complication in ITK.  In a
multithreaded
> filter, the threaded method can call something like GetInput().

Yup. And GetInput will not be the only method you will have problems
with. I think some sort of standard here would help.

1) Maybe a rule that no GetMethod can write to an ivar (directly or
indirectly)

or

2) Another option is that any multithreaded function must be passed
only native data types.

or

3) Any methods that do not write (directly or indirectly) have a
special signature. I would say just put this information into a
special doxygen tag but then method a calls method b and someone
changes method b without updating the docs for method a.

Ken