ggandda / simd-cxx

Automatically exported from code.google.com/p/simd-cxx
0 stars 0 forks source link

Waiting for disposed samples #19

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create a datareader for a topic
2. Create a functor F that calls take on the datareader and prints out the 
sample and the associated value of sampleInfo.valid_data
2. Use reader.create_readcondition(F) to create a readcondition that calls F.
3. Attach to a waitset
4. In loop call waitset.
5. In another application create samples 1,2,3,4
6. Dispose of samples 1,2,3,4

What is the expected output? 
The waiset is woken for each create and dispose operation
The functor prints out
1 valid
2 valid
3 valid
4 valid
1 not valid
2 not valid
3 not valid
4 not valid

What do you see instead?
The waitset is not woken until a new sample 5 is created.
The functor will then successfully print out that 1-4 are no longer valid.

What version of the product are you using? On what operating system?
SimD 0.8 on Windows XP built on top of OpenSplice 5.1

Please provide any additional information below.
Using the default datareader take operation I am able to take a disposed sample 
for any instance that had previously been taken while alive using the default 
calls to the take function.
I would expect the default readcondition created by reader.create_readcondition 
to evaluate to true for any data that will then be retrieved by the take 
operation.

Could we either change the create_readcondition in reader_impl.hpp to specify 
ANY_INSTANCE_STATE or allow the masks to be explicitly passed through the 
datareader call?

Thanks

Nick

Original issue reported on code.google.com by nick.gl...@lycos.com on 2 Sep 2010 at 12:48

GoogleCodeExporter commented 8 years ago
The reader API has been extended to provide a call that allows to define the 
statuses to be considered for a ReadCondition
The fix is in the repo and will be part of SimD v0.9

Original comment by angelo.corsaro@gmail.com on 12 Oct 2010 at 7:43