eProsima/Integration-Service

Improve SystemHandle API for async middlewares

Closed this issue · 0 comments

The current soss::SystemHandle API assumes that the underlying middleware does not run async, but many middlewares do run async, and that feature should be leveraged appropriately.

The current API which uses SystemHandle::spin_once() should be changed to:

/// Tell the middleware to begin spinning
void spin();

/// Tell the middleware to interrupt its spinning
void interrupt();

This way every middleware can use its internal faculties to prevent busy waiting.