Forums » C++ Framework » sem_init bug in CCTextureCache.cpp »
| Keith Emnett | sem_init bug in CCTextureCache.cpp | ||
|---|---|---|---|
|
Added by Keith Emnett about 1 year ago
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. http://www.lastrayofhope.com/2011/03/15/ios-semaphore-problems/ |
||
| Minggo Zhang | RE: sem_init bug in CCTextureCache.cpp | ||
|
Added by Minggo Zhang about 1 year ago
Does official Apple documents confirm it? |
||
| Keith Emnett | RE: sem_init bug in CCTextureCache.cpp | ||
|
Added by Keith Emnett about 1 year ago
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. |
||
| Andre Rudlaff | RE: sem_init bug in CCTextureCache.cpp | ||
|
Added by Andre Rudlaff about 1 year ago
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. |
||
| Minggo Zhang | RE: sem_init bug in CCTextureCache.cpp | ||
|
Added by Minggo Zhang about 1 year ago
Thank you. #1214 is created for it. |
(1-4/4)