mirror of https://github.com/mpv-player/mpv
6cd80e972e
Instead of adding a lock_frame to the list when mp_dispatch_lock() is called, just set a simple flag. This uses the fact that the lock is not recursive, and can happen once per mp_dispatch_queue_process(). It avoids the dynamic allocation, and makes error checking slightly stricter. Again, this is actually redundant and exists only for error-checking. It'd actually need only a counter, because the actual locking is done by "parking" the target thread in mp_dispatch_queue_process() and then setting queue->idling=false. Only when mp_dispatch_unlock() sets it to true again other work can proceed again. Document this too. |
||
---|---|---|
.. | ||
bstr.c | ||
bstr.h | ||
charset_conv.c | ||
charset_conv.h | ||
ctype.h | ||
dispatch.c | ||
dispatch.h | ||
json.c | ||
json.h | ||
node.c | ||
node.h | ||
rendezvous.c | ||
rendezvous.h | ||
ring.c | ||
ring.h |