POSIX_MQ#notify block execution on message received
This is implementation uses both a short-lived POSIX thread and
a pre-spawned Ruby Thread in a manner that works properly under
both Ruby 1.8 (green threads) and 1.9 (where Ruby Threads are
POSIX threads).
The short-lived POSIX thread will write a single "\0" byte to
a pipe the Ruby Thread waits on. This operation is atomic
on all platforms. Once the Ruby Thread is woken up from the
pipe, it will execute th block given to it.
This dual-thread implementation is inspired by the way glibc
implements mq_notify(3) + SIGEV_THREAD under Linux where the
kernel itself cannot directly spawn POSIX threads.