Fix false positive DHECK in event_posix.cc
It's OK that state is kDown when a thread is woken after being signalled; another tread might also have woken and already set the state to kDown. Even if this waking and aquiring lock has been delayed until other threads have set state to kDown and then subsequently to kUp again with a new Set() call, it's OK to just set kDown and return since this thread is returning kEventSignaled after the (new) Set() has ben called. R=pbos@webrtc.org TBR=tommi@webrtc.org BUG= Review URL: https://webrtc-codereview.appspot.com/36109004 Cr-Commit-Position: refs/heads/master@{#8334} git-svn-id: http://webrtc.googlecode.com/svn/trunk@8334 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
11426dc719
commit
a6e8cebbd5
@ -151,7 +151,7 @@ EventTypeWrapper EventPosix::Wait(unsigned long timeout) {
|
||||
// Be careful to only change the state if we're about to report that the
|
||||
// event was signaled.
|
||||
if (ret_val == 0) {
|
||||
DCHECK(state_ == kUp);
|
||||
// state_ might already be kDown, in case of multiple waiters. That's OK.
|
||||
state_ = kDown;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user