Date: Thu, 29 Mar 2001 13:31:20 -0600 From: "Jim King" <jim@jimking.net> To: "Nate Williams" <nate@yogotech.com>, "Brian Matthews" <blm@actzero.com> Cc: <nate@yogotech.com>, "Allen Landsidel" <all@biosys.net>, <freebsd-stable@FreeBSD.ORG> Subject: Re: Threads vs. blocking sockets Message-ID: <00dd01c0b886$d8510250$524c8486@jking> References: <F0D64494733BD411BB9A00D0B74A0264021C9E@cpe-24-221-167-196.ca.sprintbbd.net> <15043.35980.669828.971544@nomad.yogotech.com>
next in thread | previous in thread | raw e-mail | index | archive | help
"Nate Williams" <nate@yogotech.com> wrote: > > | 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. The man page for send(2) doesn't mention this. It sounds broken to me. Jim 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?00dd01c0b886$d8510250$524c8486>