about summary refs log tree commit homepage
DateCommit message (Collapse)
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
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-05-04doc: updates for RDoc 2.5.x
2010-05-04rename `posix-mq.rb' executable to `posix-mq-rb'
".rb" in the executable name is discouraged by the {Ruby packaging standard}[http://github.com/chneukirchen/rps] and probably confusing. If I ever get around to it, a non-Ruby version of this executable is planned, and that will be called "posix-mq"
2010-04-22GC safety fixes
Avoid the RSTRING_PTR(rb_inspect(val)) construct, as it may not preserve the value of rb_inspect() on the stack.
2010-04-21cleaner lookup "Signal" of constant
Instead of blindly defining a module, this is more flexible in case Signal in Ruby itself becomes something other than a module.
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-13ensure POSIX_MQ#name is clobber-proof
We don't want folks to accidentally clobber the value for others, so allocate a new string object for it (don't worry, rb_str_dup() is cheap in 1.9).
2010-03-13remove non-portable #warning CPP directive
There's a good chance they're not using GCC if they're on some weird platform that we'd emit a warning for.
2010-03-02add TODO item for using netlink under Linux