Android Trivia!
Thread A calls pthread_mutex_lock/unlock ~30 times per second.
Thread B already called pthread_mutex_lock and is waiting for A to unlock.
What should happen?
1. Thread B acquires the lock as soon as A unlocks.
2. Thread B acquires the lock after > 8 seconds.
56%
Option 1 (ASAP)
44%
Option 2 (8 seconds)
347 votes β’ Final results