A spurious wakeup happens when a thread wakes up from waiting on a
condition variable that’s been signaled, only to discover that the
condition it was waiting for isn’t satisfied.
It’s called spurious because the thread has seemingly been awakened
for no reason. But spurious wakeups don’t happen for no reason: they
usually happen because, in between the time when the condition
variable was signaled and when the waiting thread finally ran, another
thread ran and changed the condition. There was a race condition
between the threads, with the typical result that sometimes, the
thread waking up on the condition variable runs first, winning the
race, and sometimes it runs second, losing the race.
如果人们反复地做出个人选择,帮助他人,他们就会开始将付出行为内化为自我认同的一部分。对于一些人来说,这种变化产生于一种积极的认知失调过程:一旦我自愿做出了付出的决定,我就没法改变这个行为,因此为了保持一致和避免伪善,最简便的办法就是认为自己是一个付出者。对于其他人来说,这种内化过程是从观察他们自己的行为中学到的。借用作家E.M.福斯特(E. M. Forster)的一句话:“除非我看到自己的所作所为,否则我怎么能知道自己是个什么样的人?”