Open cliffg-softwarelibre opened 5 years ago
Here's the documentation for future. I'd be interested in picking up this task. https://en.cppreference.com/w/cpp/thread/future
This is related to https://github.com/connectivecpp/chops-net-ip/issues/11 and https://github.com/connectivecpp/chops-net-ip/issues/10. I'll write a discussion in the team area to get us started (this will be a discussion between me, Nathan, and Roxanne).
An alternative to output queues for outgoing data is to let applications send a message or buffer one at a time with some form of notification when each write completes. This would require a
send
method that returns astd::future
, which resolves when the write completes. Discussion is needed as to whether the application would be completely responsible for buffer lifetime management, or whether we require some form of reference count or move (or similar) for the output buffer.Chops Net IP would need to track whether a write is in progress or not. The library should prevent applications from more than one write at a time (on a given connection).