fix potential race with notify(&block)
commit19668b0edc9b09cfd72247f7041390e0328032a0
authorEric Wong <normalperson@yhbt.net>
Wed, 3 Mar 2010 05:20:28 +0000 (2 21:20 -0800)
committerEric Wong <normalperson@yhbt.net>
Wed, 3 Mar 2010 06:44:36 +0000 (2 22:44 -0800)
treef2d0d7bb08612cb597ec684705ee0c7957df76f3
parent0f4a8ef81479f9eff9037011d81b96cf402cbe7b
fix potential race with notify(&block)

We need to assign the notify_thread before assigning the
notification.  Otherwise, there's a chance the notification
could fire and the notify_thread is not properly assigned for
the POSIX_MQ object when the pipe becomes readable.
lib/posix_mq.rb