From 3700db51399e4949ed314ad0545d037b7762064e Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 7 Jan 2010 09:28:57 +0000 Subject: POSIX_MQ#notify only works on GNU/Linux for now SIGEV_THREAD is not easy to implement, so many platforms do not implement it. --- lib/posix_mq.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/posix_mq.rb b/lib/posix_mq.rb index 91f4140..8897050 100644 --- a/lib/posix_mq.rb +++ b/lib/posix_mq.rb @@ -37,6 +37,12 @@ class POSIX_MQ # first message and must be reset/reenabled for subsequent # notifications. This block will execute in a separate Ruby # Thread (and thus will safely have the GVL by default). + # + # This method is only supported on platforms that implement + # SIGEV_THREAD functionality in mq_notify(3). So far we only + # know of glibc + Linux supporting this. Please let us + # know if your platform can support this functionality and + # are willing to test for us def notify(&block) block.arity == 1 or raise ArgumentError, "arity of notify block must be 1" @@ -58,7 +64,7 @@ class POSIX_MQ self.notify = w self.notify_thread = thr nil - end + end if RUBY_PLATFORM =~ /linux/ end -- cgit v1.2.3-24-ge0c7