keith at April 24th, 2012 00:00 — #1
hi - the sem_init() call is not supported on ios. it will set errno and fail to create a semaphore, meaning the sem_wait() call in the main run loop will return immediately. only named semaphores (using sem_open) are supported. i’m not sure how this affects other platforms.
zhangxm at April 24th, 2012 23:38 — #2
Does official Apple documents confirm it?
keith at April 27th, 2012 12:23 — #3
If you call sem_init the return val is –1, and if you check errno after the call it is set to 78 (Function not implemented). I haven’t seen any other documentation about it.
weeds at April 28th, 2012 05:09 — #4
I can confirm this as well, using the async texture loader will put the loading thread into a busy loop as the semaphore call fails instantly.
On an iPad2 I had about 120-150 CPU usage with the loading thread active (and idle) and about 20-30 without.
It wasn’t really affecting performance as this happend on the 2nd core, but may drain the battery a lot.
zhangxm at May 3rd, 2012 01:49 — #5
#1214 is created for it.