Craig so how does using pthread_cond_timedwait affect socket processing? The promise of nanosleep was to wake up if an interrupt arrived say on a socket (Mind I never actually confirmed this the case, complete hearsay...) 

On Thu, Feb 12, 2015 at 2:40 AM, Craig Latta <> wrote:

Hoi Norbert--

     In 2003, while implementing remote messaging for what became the
Naiad distributed module system[1], I noticed excessive CPU usage during
idle by Squeak on MacOSX (and extremely poor remote messaging
performance). I prepared alternate versions of
ioRelinquishProcessorForMicroseconds, comparing:

-    select() (AKA aioSleepForUsecs in Ian's aio API, my starting point)
-    pthread_cond_timedwait()
-    nanosleep()

     pthread_cond_timedwait was the clear winner at the time. I wrote my
own relinquish primitive as part of the Flow external streaming
plugin[2], and I've been using it ever since. Still seems fine. I've
mentioned this before.




Craig Latta
+31 6 2757 7177 (SMS ok)
+ 1 415 287 3547 (no SMS)

John M. McIntosh <johnmci@smalltalkconsulting.com