[Insight-developers] itkTimeStamp Test Failures Mistery
Bradley Lowekamp
blowekamp at mail.nih.gov
Fri Feb 20 12:08:10 EST 2009
So should we change the test so that each thread has it own
itkTimeStamp class. There by just testing that the class is reentrant.
And then specify in the TimeStamp documentation class that it is only
re-entrant.
I think that the test should then pass. And it'll test the needed
functionality. Anyone object?
Brad
On Feb 20, 2009, at 11:22 AM, Tom Vercauteren wrote:
> Hey Brad,
>
>> According to QT, the optimized timestamp is thus reentrant but not
>> thread-safe:
>> http://doc.trolltech.com/4.4/threads.html#reentrancy-and-thread-
>> safety
>> "By extension, a class is said to be reentrant if each and every one
>> of its functions can be called simultaneously by multiple threads on
>> different instances of the class. Similarly, the class is said to be
>> thread-safe if the functions can be called by different threads on
>> the
>> same instance."
>>
>> It appears the goal here is to make itkTimeStamp thread-safe. Does
>> any of
>> ITK meet this definition? I know there are some parts which should be
>> reentrant (itkObjectFactory) but are not.
>> Why are we trying to get it to be thread-safe? Is this need? Where
>> is this
>> need? Does every instance of TimeStamp need to meet this requirement?
>> If only some do, do we need two types of TimeStamp class say:
>> itkTimeStamp - guaranteed to be only reentrant.
>
> I definitely agree that these are the questions we need to answer.
>
>
>> itkThreadSafeTimeStamp - guaranteed to be thread-safe as per the
>> above
>> definition
>> I just wanted to check to see why this test was written the way it
>> was and
>> if it was intentionally done so.
>
> Well I wrote that test :(
> I just used the simplest framework I could think of at that time to
> test the timestamp. Guess it wasn't that easy...
>
> Tom
========================================================
Bradley Lowekamp
Lockheed Martin Contractor for
Office of High Performance Computing and Communications
National Library of Medicine
blowekamp at mail.nih.gov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20090220/36818cf3/attachment.htm>
More information about the Insight-developers
mailing list