about summary refs log tree commit homepage
path: root/lib
DateCommit message (Collapse)
2016-02-02enable frozen_string_literal for Ruby 2.3+
No changes for older Rubies, but this reduces garbage under 2.3
2015-01-09change mailing list to ruby-posix-mq@bogomips.org
The public-inbox + mlmmj setup on bogomips.org allows posting without subscription and offers downloadable archives via git. The lack of rsyncable archives on librelist nowadays and subscription-required nature of librelist are points against it. Repliers are now encouraged to Cc: all recipients (using the reply-all function of their mail client) since many readers are not subscribed. This project has never accepted or encouraged HTML email, but librelist accepted it. The bogomips.org mail server is configured to treat HTML mail as spam, so do not send HTML mail if you expect a response. Users who wish to subscribe may send a message to: ruby-posix-mq+subscribe@bogomips.org Similarly, they may unsubscribe via: ruby-posix-mq+unsubscribe@bogomips.org HTTP archives are available via: http://bogomips.org/ruby-posix-mq/ ssoma users may also use: git://bogomips.org/ruby-posix-mq (see README change) Old messages to the librelist addresses will continue to get routed to the new mailing list. ref: http://public-inbox.org/
2011-03-01make methods that should be private, private
So private we won't mention them in the commit message!
2011-02-27fix warnings and enable them for tests
Cleaner code anyways.
2011-02-27bump version to 0.8.0pre v0.8.0pre
Remove the VERSION constant, it's cruft.
2011-02-23posix_mq 0.7.0 - cleanups + portability fixes v0.7.0
This release now works for systems other than Linux and FreeBSD that support POSIX message queues. This is usable for systems without mq_timedsend() or mq_timedreceive() but with the non-timed variants (timeouts wont work). Thanks to Tadeusz Bochan for testing. Ruby posix_mq is now dual-licensed under the GPLv2 (as well as the preferred LGPLv3) for compatibility with existing GPLv2-only code.
2011-02-23doc: full rdoc coverage!
2011-02-23doc: discourage the use of notify
POSIX_MQ#notify(&block) mostly sucks.
2011-02-23unindent class methods
No need to waste indentation and make eyes wander.
2010-12-25posix_mq 0.6.0 - Rubinius support v0.6.0
Rubinius 1.2 as well as Ruby 1.9. Ruby 1.8 works except it will block the entire interpreter for blocking operations. Spurious errors during GC for POSIX_MQ#to_io users are now avoided.
2010-05-09posix_mq 0.5.1 v0.5.1
Fix POSIX_MQ#notify(&block) usage, this regression was introduced in 0.4.0 and our tests for it were broken, as well.
2010-05-09fix POSIX_MQ#notify(&block) aka SIGEV_THREAD
tests for them were stupidly broken and never executed :x
2010-05-04posix_mq 0.5.0 v0.5.0
Uncommonly raised exceptions due to programmer error are now raised more safely with respect to the MRI garbage collector. The "posix-mq.rb" executable has been renamed to "posix-mq-rb" to respect RPS and is also hopefully easier to type/read when used in scripts. I'm preserving the "rb" in the name since I hope to have a more portable, C-only version someday. Minor cleanups and documentation now uses RDoc 2.5.x
2010-03-13posix_mq 0.4.0 v0.4.0
Small bugfixes and small API changes to avoid potential issues/misuse are the focus of this release. For non-blocking operation, the GVL is no longer bounced. This reduces synchronization/scheduling overhead when used in non-blocking applications. Small cleanups and documentation improvements, too. * make POSIX_MQ#dup and POSIX_MQ#clone no-op * do not release GVL for non-blocking operations * do not release GVL when unlinking/opening * POSIX_MQ#<< does not release GVL when non-blocking * avoid shadow warnings * README: add mailing list archives info * POSIX_MQ#to_io works under FreeBSD, too * fix potential race with notify(&block) * add TODO item for using netlink under Linux * remove non-portable #warning CPP directive * ensure POSIX_MQ#name is clobber-proof
2010-03-02fix 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.
2010-02-20make POSIX_MQ#dup and POSIX_MQ#clone no-op
It'll cause problems for the automatic mq_close() during GC otherwise, as dup(2) on an mqd_t isn't portable. Of course there's no point in cloning or duping, either, as mq_send/mq_receive operations are always atomic at the kernel level and only one thread can have a notification registered for it.
2010-02-13posix_mq 0.3.1 v0.3.1
This fixes a misuse of the Ruby API leading to memory leaks in cases where message queues are continually opened and closed throughout the lifetime of the application. Fortunately applications have little reason to repeatedly open and close message queue descriptors: they are multi-thread/multi-process-safe in every way imaginable and also capable of non-blocking operation.
2010-01-09posix_mq 0.3.0 v0.3.0
This release adds a few new API methods, fixes MRI 1.8.6 support. We should now have full feature parity with underlying POSIX message queue C API. * POSIX_MQ#notify(&block) RDoc: http://bogomips.org/ruby_posix_mq/POSIX_MQ.html#M000001 This is only supported on platforms that implement SIGEV_THREAD with mq_notify(3) (tested with glibc + Linux). Other platforms will have to continue to rely on signal notifications via POSIX#notify=signal, or IO notifications in FreeBSD (and Linux). * POSIX_MQ#shift([buffer [,timeout]]) Shorthand for the common "POSIX_MQ#receive.first" when you do not care for priority of the received message. Rev, EventMachine and Reactor support are planned for Linux, FreeBSD and possibly any other platforms where POSIX message queues are implemented with a file descriptor.
2010-01-07POSIX_MQ#notify only works on GNU/Linux for now
SIGEV_THREAD is not easy to implement, so many platforms do not implement it.
2010-01-07POSIX_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.
2010-01-03posix_mq 0.2.0 v0.2.0
This release fixes notification (un)registration and should be fully-supported on modern FreeBSD (7.2+) releases. POSIX_MQ#notify=nil correctly unregister notification requests. POSIX_MQ#notify=false now provids the no-op SIGEV_NONE functionality. Under FreeBSD, using IO.select on POSIX_MQ objects is now possible as it has always been under Linux.
2010-01-02initial commit v0.1.0