Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Mar 2001 12:27:08 -0700 (MST)
From:      Nate Williams <nate@yogotech.com>
To:        Brian Matthews <blm@actzero.com>
Cc:        "'nate@yogotech.com'" <nate@yogotech.com>, Allen Landsidel <all@biosys.net>, freebsd-stable@FreeBSD.ORG
Subject:   RE: Threads vs. blocking sockets
Message-ID:  <15043.35980.669828.971544@nomad.yogotech.com>
In-Reply-To: <F0D64494733BD411BB9A00D0B74A0264021C9E@cpe-24-221-167-196.ca.sprintbbd.net>
References:  <F0D64494733BD411BB9A00D0B74A0264021C9E@cpe-24-221-167-196.ca.sprintbbd.net>

next in thread | previous in thread | raw e-mail | index | archive | help
> | Therefore, if you call a blocking system call, *ALL* threads 
> | block, thus causing your entire application to 'hang'.
> 
> That's why there are wrappers for the socket calls in libc_r, so a socket as
> seen by the kernel is always nonblocking (and thus won't hang the entire
> application), but a socket seen by the application can be blocking or
> nonblocking, whichever makes most sense for the application. Unfortunately,
> the wrappers only do half the job.

Again, all threading libraries I've used (not just on FreeBSD) *require*
the user to check that when sending/receiving data, the caller must make
sure that all the expected data has been sent/received.



Nate

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15043.35980.669828.971544>