From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f678f,562d37d12a49893d X-Google-Attributes: gidf678f,public X-Google-ArrivalTime: 1993-09-17 18:17:26 PST Newsgroups: comp.unix.osf.misc Path: gmd.de!newsserver.jvnc.net!yale.edu!xlink.net!howland.reston.ans.net!usc!cs.utexas.edu!uunet!caen!nic.umass.edu!noc.near.net!atria.com!pluto!mishkin From: mishkin@atria.com (Nathaniel Mishkin) Subject: Re: Threads and shared memory Message-ID: Sender: news@atria.com Nntp-Posting-Host: 192.88.237.52 Organization: Atria Software, Inc. X-Newsreader: TIN [version 1.2 PL0] References: <301@vercors.frec.bull.fr> <27co6m$qsg@liege.ics.uci.edu> Date: Fri, 17 Sep 1993 20:02:49 GMT Douglas C. Schmidt (schmidt@liege.ics.uci.edu) wrote: : As far as I know, poll() in SVR4 can basically wait for the : same class of descriptors that select() Guess I'm a bit out of date in this area. : Unfortunately, WaitForMultipleObjects isn't quite as useful as : select() or poll() since it only reports 1 object of the set of n : objects when it returns As long as WaitForMultipleObjects() is reasonably fast when one of the objects is signalled, I guess I wouldn't worry about this difference from select(). : Moreover, it remains unclear whether : sockets fit into the WaitForMultipleObjects paradigm. If they : *don't*, then we're basically back to the UNIX morass again... Yes, that would be bad, but fortunately, I think Winsock SOCKETs are really Win32 HANDLEs and can be used in the Wait... calls the way you'd want. Note that MS's hands were a bit tied here by the fact that they're trying to implement a "standard" API in this case (i.e., Winsock) and in doing so one runs the risk that it won't fit in with one's other APIs as well as one would like. (Of course they participated in the Winsock design, so...) But they have a pretty reasonable track record here; consider the (what I thought to be the amusingly named, considering the newsgroup we're in) get_osfhandle() and open_osfhandle() calls that can be used to map between "file descriptors" and "OS handles" (HANDLEs in the Win16 and Win32 APIs). -- -- Nat Mishkin Atria Software, Inc. mishkin@atria.com