diff options
Diffstat (limited to 'lib/posix_mq.rb')
-rw-r--r-- | lib/posix_mq.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/posix_mq.rb b/lib/posix_mq.rb index af31c16..86fa67e 100644 --- a/lib/posix_mq.rb +++ b/lib/posix_mq.rb @@ -66,6 +66,18 @@ class POSIX_MQ nil end if RUBY_PLATFORM =~ /linux/ + # There's no point in ever duping a POSIX_MQ object. + # All send/receive operations are atomic and only one + # native thread may be notified at a time + def dup + self + end + + # There's no point in ever cloning a POSIX_MQ object. + # All send/receive operations are atomic and only one + # native thread may be notified at a time + alias clone dup + end require 'posix_mq_ext' |