Updated and merged WaitSet approach into polled approach. Updated rt…#38
Updated and merged WaitSet approach into polled approach. Updated rt…#38neil-rti wants to merge 1 commit intorticommunity:masterfrom neil-rti:master
Conversation
| #include "../CommonInfrastructure/DDSTypeWrapper.h" | ||
| #include "../CommonInfrastructure/OSAPI.h" | ||
|
|
||
| #define VTE_USE_WAITSET // comment-out to use polling for received track data |
There was a problem hiding this comment.
Instead of commenting it out there. I would add this option to the makefiles and Visual Studio solutions that build the product. That is, you would compile with -DVTE_USE_WAITSET if I wanted to have it available and I would skip it otherwise.
That decouples the code from the required compilation.
There was a problem hiding this comment.
Anyway, do you think it's interesting to implement the polling case? Maybe we should just use the waitset always, in that case this define wouldn't be needed.
| std::vector< DdsAutoType<Track> > *tracksDeleted) | ||
| { | ||
|
|
||
| _mutex->Lock(); |
There was a problem hiding this comment.
Why do you need a mutex to wait for data to become available? I wonder if that mutex is really neede. @rosemwahlin, do you know if we really need that mutex?
Also, if I were to implement this lock, I would apply RAII and create a lock that locks in the constructor and unlocks in the destructor, so that you don't have to release the lock every time you throw an exception.
…i logo