Add poll function to the ServiceExecutor API

XMLWordPrintableJSON

    • Type: New Feature
    • Resolution: Fixed
    • Priority: Major - P3
    • 4.7.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • Service arch 2020-07-13, Service Arch 2020-07-27, Service Arch 2020-08-10
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      If we are on a thread pool, we want to avoid blocking threads while waiting for new data to read. This would imply that a thread somewhere is [e]polling for us, most likely an ASIOReactor. However, if we’re already on a dedicated thread, we want to block our own thread. To solve this contradiction, we want to provide a function Future<void> ServiceExecutor::waitForData(Session*) that polls and then reschedules execution for its future. We should be able to invoke asio::async_read with an asio::null_buffers, thus copying no data until we are safely on the correct thread.

            Assignee:
            Amirsaman Memaripour
            Reporter:
            Benjamin Caimano (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: