Skip to content
Snippets Groups Projects
Select Git revision
  • benchmark-tools
  • postgres-lambda
  • master default
  • REL9_4_25
  • REL9_5_20
  • REL9_6_16
  • REL_10_11
  • REL_11_6
  • REL_12_1
  • REL_12_0
  • REL_12_RC1
  • REL_12_BETA4
  • REL9_4_24
  • REL9_5_19
  • REL9_6_15
  • REL_10_10
  • REL_11_5
  • REL_12_BETA3
  • REL9_4_23
  • REL9_5_18
  • REL9_6_14
  • REL_10_9
  • REL_11_4
23 results

unix_latch.c

Blame
    • Tom Lane's avatar
      e42a21b9
      Assert that WaitLatchOrSocket callers cannot wait only for writability. · e42a21b9
      Tom Lane authored
      Since we have chosen to report socket EOF and error conditions via the
      WL_SOCKET_READABLE flag bit, it's unsafe to wait only for
      WL_SOCKET_WRITEABLE; the caller would never be notified of the socket
      condition, and in some of these implementations WaitLatchOrSocket would
      busy-wait until something else happens.  Add this restriction to the API
      specification, and add Asserts to check that callers don't try to do that.
      
      At some point we might want to consider adjusting the API to relax this
      restriction, but until we have an actual use case for waiting on a
      write-only socket, it seems premature to design a solution.
      e42a21b9
      History
      Assert that WaitLatchOrSocket callers cannot wait only for writability.
      Tom Lane authored
      Since we have chosen to report socket EOF and error conditions via the
      WL_SOCKET_READABLE flag bit, it's unsafe to wait only for
      WL_SOCKET_WRITEABLE; the caller would never be notified of the socket
      condition, and in some of these implementations WaitLatchOrSocket would
      busy-wait until something else happens.  Add this restriction to the API
      specification, and add Asserts to check that callers don't try to do that.
      
      At some point we might want to consider adjusting the API to relax this
      restriction, but until we have an actual use case for waiting on a
      write-only socket, it seems premature to design a solution.