public inbox for cygwin-developers@cygwin.com
 help / color / mirror / Atom feed
From: "Ford, Brian" <brian.ford@flightsafety.com>
To: "cygwin-developers@cygwin.com" <cygwin-developers@cygwin.com>
Subject: RE: Non-blocking fhandler_socket_wsock::send_internal ?
Date: Mon, 30 Mar 2020 21:45:54 +0000	[thread overview]
Message-ID: <6f36370302cb4303930fd4b79b10c32a@v0001wsxm02.flightsafety.com> (raw)
In-Reply-To: <58ab65266a624be49077763afd2e6875@v0001wsxm02.flightsafety.com>

Nevermind, I see in wait_for_events how it is supposed to work.  Sorry for the noise.  I'd be glad to hear any reasons you might expect a non-blocking UDP socket sendto to block for 50-100 ms though.  Thanks.

-----Original Message-----
From: Cygwin-developers [mailto:cygwin-developers-bounces@cygwin.com] On Behalf Of Ford, Brian via Cygwin-developers
Sent: Monday, March 30, 2020 3:45 PM
To: cygwin-developers@cygwin.com
Subject: Non-blocking fhandler_socket_wsock::send_internal ?

EXTERNAL EMAIL: STOP and verify sender address, links, and attachments before taking action.


I'm trying to debug an application that occasionally takes an excessive amount of time in the sendto call of a non-blocking UDP socket and I noticed the following code that I didn't understand but looked slightly suspicious:
1423       while (res && (WSAGetLastError () == WSAEWOULDBLOCK)
1424              && !(res = wait_for_events (FD_WRITE | FD_CLOSE, wait_flags)));

Could you explain why I shouldn't be concerned about a non-blocking socket apparently calling a function labeled wait_for_events before returning :-)?

Thank you for your time!

[https://elearning.flightsafety.com/media/wysiwyg/SIGNATURE_BANNER/FlightSafety_65th_logo.jpg]<https://elearning.flightsafety.com/fsi_65_redirect>

Brian Ford  *  Systems Architect
FVS  *  FVS Engineering  *  5695 Campus Parkway  *  Hazelwood, MO, 63042  *  United States
Tel: 314.551.8460  *  Cell: 314.3276088
Brian.Ford@FlightSafety.com<mailto:Brian.Ford@FlightSafety.com>  *  flightsafety.com<https://www.flightsafety.com/>  *  A Berkshire Hathaway company Privacy Notice<https://www.flightsafety.com/fs_privacynotice.php>



      reply	other threads:[~2020-03-30 21:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-30 20:45 Ford, Brian
2020-03-30 21:45 ` Ford, Brian [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6f36370302cb4303930fd4b79b10c32a@v0001wsxm02.flightsafety.com \
    --to=brian.ford@flightsafety.com \
    --cc=cygwin-developers@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).