« Previous | Next » 

Revision 51e3bb92

ID51e3bb9294fc333e07af4f26257738e4caa6e99e

Added by Michael Hanselmann over 14 years ago

Fix long-standing race condition bug in locking unittest

Every once in a while we saw failures in the locking unittest, but
weren't able to determine the cause. This patch fixes it by using
threading.Event instead of plain threading.Condition to notify another
thread. In most cases, threading.Condition must be used with another
variable to keep the actual state. threading.Event does this for us.
Otherwise it can happen that the waiter only gets the lock after
condition was notified.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences