Skip to content

Conversation

@neil-rti
Copy link
Contributor

…i logo

#include "../CommonInfrastructure/DDSTypeWrapper.h"
#include "../CommonInfrastructure/OSAPI.h"

#define VTE_USE_WAITSET // comment-out to use polling for received track data
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants