Re: [AD] Test patch

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Peter Wang wrote:
I think automatically switching to another thread would really hurt performance if all mutexes worked that way (and this is surely the domain of the thread system and not Xlib).

I wouldn't be so sure. The thread that's blocked waiting would pretty much be asleep so the main program is getting a boost while it's holding the lock. Once it unlocks, it should pass control to the waiting thread since it left prematurely before.

Maybe we could try something using condition variables?

That looks ugly... I'd be content just warning to yield or rest every loop iteration if you're doing a lot of operations on the screen/video bitmaps.

- Kitty Cat




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/