Skip to content
Snippets Groups Projects
  1. Mar 27, 2018
  2. Mar 13, 2018
  3. Mar 06, 2018
  4. Mar 02, 2018
  5. Feb 15, 2018
  6. Feb 09, 2018
  7. Dec 15, 2017
  8. Oct 16, 2017
  9. Oct 04, 2017
  10. Sep 06, 2017
    • Eric Blake's avatar
      io: Add new qio_channel_read{, v}_all_eof functions · e8ffaa31
      Eric Blake authored
      
      Some callers want to distinguish between clean EOF (no bytes read)
      vs. a short read (at least one byte read, but EOF encountered
      before reaching the desired length), as it allows clients the
      ability to do a graceful shutdown when a server shuts down at
      defined safe points in the protocol, rather than treating all
      shutdown scenarios as an error due to EOF.  However, we don't want
      to require all callers to have to check for early EOF.  So add
      another wrapper function that can be used by the callers that care
      about the distinction.
      
      Signed-off-by: default avatarEric Blake <eblake@redhat.com>
      Message-Id: <20170905191114.5959-3-eblake@redhat.com>
      Acked-by: default avatarDaniel P. Berrange <berrange@redhat.com>
      e8ffaa31
    • Eric Blake's avatar
      io: Yield rather than wait when already in coroutine · 9ffb8270
      Eric Blake authored
      
      The new qio_channel_{read,write}{,v}_all functions are documented
      as yielding until data is available.  When used on a blocking
      channel, this yield is done via qio_channel_wait() which spawns
      a nested event loop under the hood (so it is that secondary loop
      which yields as needed); but if we are already in a coroutine (at
      which point QIO_CHANNEL_ERR_BLOCK is only possible if we are a
      non-blocking channel), we want to yield the current coroutine
      instead of spawning a nested event loop.
      
      Signed-off-by: default avatarEric Blake <eblake@redhat.com>
      Message-Id: <20170905191114.5959-2-eblake@redhat.com>
      Acked-by: default avatarDaniel P. Berrange <berrange@redhat.com>
      [commit message updated]
      Signed-off-by: default avatarEric Blake <eblake@redhat.com>
      9ffb8270
  11. Sep 05, 2017
Loading