Remove race between Test and Kafka on extractData
Resolves the race between the test thread and Kafka thread when Kafka is waiting for extractData to be called. We now use the callback mechanism in waitForRunObservation. Also adds some mutex's so the kernel can see when a CV should be rechecked, atomics work because eventually the scheduler gives in and tries again (hence we need pred.s). However, if we protect the atomic access the other thread is resumed when the lock is released from the original thread.
Showing
- Framework/LiveData/src/Kafka/IKafkaStreamDecoder.cpp 22 additions, 8 deletionsFramework/LiveData/src/Kafka/IKafkaStreamDecoder.cpp
- Framework/LiveData/test/KafkaEventStreamDecoderTest.h 4 additions, 9 deletionsFramework/LiveData/test/KafkaEventStreamDecoderTest.h
- Framework/LiveData/test/KafkaTestThreadHelper.h 37 additions, 20 deletionsFramework/LiveData/test/KafkaTestThreadHelper.h
Loading
Please register or sign in to comment