about summary refs log tree commit homepage
DateCommit message (Collapse)
2011-03-01posix_mq 1.0.0 - kinder, gentler message queues v1.0.0
There is one backwards-incompatible API change: POSIX_MQ#send returns +true+ on success instead of +nil+ for consistency with POSIX_MQ#trysend. This release adds the POSIX_MQ#trysend, POSIX_MQ#tryreceive and POSIX_MQ#tryshift interfaces to avoid exceptions on common EAGAIN errors for users of non-blocking queues. Bugfixes: non-blocking behavior changes to a shared descriptor in a different process are reflected immediately in the child (this won't fix race conditions in your code, however). Minor bugfixes for posix-mq-rb(1) and quieted warnings for 1.9.3dev.
2011-03-01make methods that should be private, private
So private we won't mention them in the commit message!
2011-03-01remove unused tryinit function
Something I considered but decided wasn't worth doing.
2011-03-01POSIX_MQ#send returns +true+ on success
This is to be consistent with POSIX_MQ#trysend
2011-03-01finalize try* interfaces
Consider them good enough for a 1.0.0 release
2011-02-27posix-mq-rb: always prefer write-in-full behavior
In case somebody made the receiving pipe non-blocking, we want the command-line tool to succeed.
2011-02-27fix warnings and enable them for tests
Cleaner code anyways.
2011-02-27posix-mq-rb: use IO#binmode to get binary IOs
Avoids warnings this way
2011-02-27doc: note that the try* interfaces are not final
But they'll be pushed to the site for greater visibility.
2011-02-27bump version to 0.8.0pre v0.8.0pre
Remove the VERSION constant, it's cruft.
2011-02-27doc: fix doc generation for manpage
Oops
2011-02-27add trysend, tryreceive, and tryshift interfaces
These are kinder and less exceptional than their non-trying counterparts as generating exceptions is expensive for common EAGAIN errors.
2011-02-27eliminate needless global (cPOSIX_MQ)
It can be local variable
2011-02-27run GC on ENOSPC when calling mq_open()
It could work...
2011-02-27Symbols are VALUEs, not IDs
Oops :x
2011-02-27tests: do not require Fiddle for Ruby 1.9
It's only available when compiled with libffi.
2011-02-27Do not trust locally cached mq_flags
These flags can be changed in the parent or child process, so we will always have to run mq_getattr() to check it. This removes the GVL-keeping non-blocking optimizations but we'll gain some soon.
2011-02-23cleanup DL usage for alarm() test
2011-02-23fix test alarm() case for Ruby 1.9
DL in Ruby 1.9 isn't the same
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: add copy of GPLv2
For completeness, the LGPLv3 remains the preferred license.
2011-02-23doc: note that timeout is not always supported
Maybe people will just upgrade to newer systems eventually.
2011-02-23README: update mailing list notes
If it's not clear, we hate HTML.
2011-02-23added a note about em-posixmq for EventMachine users
ref: http://mid.gmane.org/AANLkTimNcWKqNSbD5GL76Z9rS3Gfi3uGusPksD2Eo+=P@mail.gmail.com
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.
2011-02-23test for alarm() working properly to interrupt
Some systems without mq_timedsend/mq_timedreceive need to use alarm() or similar (setitimer()) to interrupt timed-out mq_send/mq_receive calls, so we need to handle EINTR properly.
2011-02-23update URLs for git and cgit
While the old URLs still work, bogomips.org went on a URL diet
2011-02-23fix MQ_IO_NIL_P and MQ_IO_CLOSE macros
These cannot be cast to void since its value is meaningful.
2011-02-23test: fix GC test for systems without POSIX_MQ#to_io
Not all systems can convert POSIX_MQ to IO objects.
2011-02-22LICENSE: dual license, adding GPLv2
This makes us explicitly compatible with GPLv2-only programs.
2011-02-22attempt to support systems w/o mq_timedsend/mq_timedreceive
Some ancient systems don't support mq_timedsend and mq_timedreceive but somehow manage to support other POSIX mq_* functions.
2011-02-22extconf: remove unnecessary dir_config statement
It's all standard C library stuff.
2011-02-22use StringValueCStr for paths
RSTRING_PTR may contain '\0' bytes which makes it unsuitable for mq_unlink() and mq_open()
2011-02-22fix broken rb_str_set_len() #define for Ruby 1.8.6
This was too aggressively deleted during cleanups for Rubinius support in commit 5339d9d693c794c0f20270d5726cb360e31dff30 Noticed-by: Tadeusz Bochan <tad.bochan@bnpparibas.com> ref: 2a92695fc1958e0370782284c6196625@ruby-forum.com
2011-02-22fix for systems that can't convert mqd_t to FD
Apparently there are OSes that don't have methods to convert mqd_t to FD. Noticed-by: Tadeusz Bochan <tad.bochan@bnpparibas.com> ref: <2a92695fc1958e0370782284c6196625@ruby-forum.com>
2011-02-22switch to pkg.mk for packaging needs
I can't stand Rake :x
2010-12-26publish_news target is less braindead
Run it by default on releases.
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-12-25switch to wrongdoc for documentation
No more JavaScript on our site!
2010-12-24add Rubinius support
Cleaner code, too, no more direct RSTRUCT usage.
2010-12-24refactor type checks and remove unnecessary guards
StringValuePtr should already be a sufficient guard. There are more tests while we're at it, too, and we'll now raise TypeError instead of ArgumentError when a POSIX_MQ::Attr is not passed properly.
2010-12-24remove rb_time_interval() and gettimeofday() dependency
This function isn't exported in the standard Ruby headers, it returns an aggregate value and isn't available in Rubinius, either, so nuke it. While we're at it, use clock_gettime() instead of gettimeofday() to avoid unnecessary timeval usage since mq_send/mq_receive rely on higher-precision timespecs instead.
2010-08-19tests: use Class#method_defined?
I did not know about this method back in the day...
2010-08-19test: avoid leaving queues behind
We shouldn't unnecessarily hog system resources.
2010-08-19avoid double close() and EBADF
It can be dangerous to hit (and ignore) EBADF errors in multi-threaded applications. Users of POSIX_MQ#to_io have two Ruby objects pointing to the same file descriptor, making things tricky when it comes time to reap resources. We'll always prefer to close the Ruby IO object if it exists (because we have less control over its GC behavior) and ignore the raw descriptor.
2010-08-02open/notify: invoke GC if needed
On ENOMEM, EMFILE, and ENFILE errors, it is customary to invoke the Ruby GC and free up resources and retry the system call.
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