public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: "Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin" <cygwin@cygwin.com>
To: "'cygwin@cygwin.com'" <cygwin@cygwin.com>
Subject: Re: semget() returns EAGAIN?
Date: Wed, 07 Aug 2019 18:01:00 -0000	[thread overview]
Message-ID: <BL0PR0901MB430859E39E94D50ABC15537FA5D40@BL0PR0901MB4308.namprd09.prod.outlook.com> (raw)

> The number of parallel open pipes, for instance.  By default, 10
> worker threads handle the load and up to 62 processes can be handled
> in parallel.

Hmm, so it is not an OS-imposed restriction...  Then I don't understand why it wasn't made to "just work":
to create a thread per client until that works, without having to have any pre-set limits.  Fail only if
the thread creation cannot be done.

> Apart from that, the preferred way to use semaphores is to use POSIX
> semaphores, that is, sem_open and friends.

Well, that's not entirely up to me, the app is already using (quite stably!) SYSV semaphore _arrays_ so switching to POSIX
would require some porting (and intensive bug checking -- provided that the app is being used on thousands of hosts).
Besides, TBH it looks like the POSIX-devising people were smoking some kind of weed when coming up with sem_timedwait() using
_absolute_ timeouts!  That's way too insane.  They also tried to screw up SYSV sems by saying they get created not necessarily
initialized (what's the point?! it totally defeats the purpose!)  TG, by then many systems had already had them implemented
decently (reset to 0 upon inception), so that "clause" did not have any chance to actually realize.


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

             reply	other threads:[~2019-08-07 18:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-07 18:01 Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-08-07  5:02 Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin
2019-08-07  8:12 ` Corinna Vinschen
2019-08-07  8:20   ` Corinna Vinschen

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=BL0PR0901MB430859E39E94D50ABC15537FA5D40@BL0PR0901MB4308.namprd09.prod.outlook.com \
    --to=cygwin@cygwin.com \
    --cc=lavr@ncbi.nlm.nih.gov \
    /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).