From: Lawrence D'Oliveiro on 9 May 2010 05:59 In message <mailman.2769.1273327083.23598.python-list(a)python.org>, exarkun(a)twistedmatrix.com wrote: > On 07:48 am, ldo(a)geek-central.gen.new_zealand wrote: > >>In message <mailman.2760.1273288730.23598.python-list(a)python.org>, >>exarkun(a)twistedmatrix.com wrote: >> >>>This is a good example of why it's a bad idea to use select on >>>Windows. >>>Instead, use WaitForMultipleObjects. >> >>How are you supposed to write portable code, then? > > With WaitForMultipleObjects on Windows, epoll on Linux, kqueue on BSD, > event completion on Solaris, etc... > > Sound like more work than using select() everywhere? Yea, a bit. But > not once you abstract it away from your actual application code. After > all, it's not like these *do* different things. They all do the same > thing (basically) - differently. Do you understand what “portable” means?
From: Paul Kölle on 9 May 2010 12:46 Am 09.05.2010 11:59, schrieb Lawrence D'Oliveiro: > In message<mailman.2769.1273327083.23598.python-list(a)python.org>, > exarkun(a)twistedmatrix.com wrote: > >> On 07:48 am, ldo(a)geek-central.gen.new_zealand wrote: >> >>> In message<mailman.2760.1273288730.23598.python-list(a)python.org>, >>> exarkun(a)twistedmatrix.com wrote: >>> >>>> This is a good example of why it's a bad idea to use select on >>>> Windows. >>>> Instead, use WaitForMultipleObjects. >>> >>> How are you supposed to write portable code, then? >> >> With WaitForMultipleObjects on Windows, epoll on Linux, kqueue on BSD, >> event completion on Solaris, etc... >> >> Sound like more work than using select() everywhere? Yea, a bit. But >> not once you abstract it away from your actual application code. After >> all, it's not like these *do* different things. They all do the same >> thing (basically) - differently. > > Do you understand what “portable” means? Yes. For me it means run as best as possible on all platforms I care about. It does *not* mean force one method from *one* platform upon all platforms for purely ideological reasons (like GTK being too stupid to tell the difference between %HOMEPATH% and %APPDATA%). cheers Paul
First
|
Prev
|
Pages: 1 2 3 4 Prev: crash in Py_EnterRecursiveCall Next: List comprehension + lambdas - strange behaviour |