1 # -*- encoding: binary -*-
4 # version of POSIX_MQ, currently 0.1.0
7 # An analogous Struct to "struct mq_attr" in C.
8 # This may be used in arguments for POSIX_MQ.new and
9 # POSIX_MQ#attr=. POSIX_MQ#attr returns an instance
12 # See the mq_getattr(3) manpage for more information on the values.
13 Attr = Struct.new(:flags, :maxmsg, :msgsize, :curmsgs)
17 # Opens a POSIX message queue and performs operations on the
18 # given block, closing the message queue at exit.
19 # All all arguments are passed to POSIX_MQ.new.
22 block_given? or return mq
26 mq.close unless mq.closed?
34 require 'posix_mq_ext'