Date | Commit message (Collapse) |
|
* avoid deprecated rb_thread_blocking_region in Ruby 2.0/2.1
* prepare for rb_thread_blocking_region removal
|
|
This will be removed in Ruby 2.2, so avoid the deprecation warning.
|
|
It'll be OK to use rb_thread_call_without_gvl when
rb_thread_blocking_region is not detectable at all.
We still use rb_thread_blocking_region for Ruby 2.0-2.1 because
rb_thread_call_without_gvl was detectable in 1.9.3, but not
usable as an internal symbol.
ref: https://bugs.ruby-lang.org/issues/9502
|
|
RAA is dead.
|
|
|
|
Blocking methods no longer raise Errno::EINTR (to match
Ruby IO semantics, making code easier to work with).
There are also many FreeBSD-related fixes thanks to
Hleb Valoshka <375gnu@gmail.com> and small code cleanups.
|
|
On my i386-freebsd9 VM, this takes just longer than the
maximum allowable time.
|
|
We need to have -lrt in LDFLAGS before we can detect it.
|
|
|
|
Somehow I mixed up return values for mq_* functions that
return "int". This was noticed on FreeBSD where mqd_t
is NOT an integer.
|
|
Some OSes have ridiculously low boundaries and we don't
want mysterious failures on them
|
|
Blocking functions should not raise Errno::EINTR to match
existing semantics of Ruby IO methods (e.g. IO.select, IO#read,
IO#write). This makes user code easier to read/write.
Like th Ruby methods we emulate, we only reacquire the GVL on
EINTR to fire signal handlers, but otherwise emulate SA_RESTART
semantics.
This is a backwards-incompatible API change (but unlikely
to break existing code).
|
|
Signed-off-by: Eric Wong <normalperson@yhbt.net>
|
|
The 3rd argument of DL::Function.new is ABI type, not a return type.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
|
|
CFLAGS=-Wall somehow got disabled in my Ruby installation...
|
|
Oops
|
|
'*' works just the same
|
|
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.
|
|
So private we won't mention them in the commit message!
|
|
Something I considered but decided wasn't worth doing.
|
|
This is to be consistent with POSIX_MQ#trysend
|
|
Consider them good enough for a 1.0.0 release
|
|
In case somebody made the receiving pipe non-blocking,
we want the command-line tool to succeed.
|
|
Cleaner code anyways.
|
|
Avoids warnings this way
|
|
But they'll be pushed to the site for greater
visibility.
|
|
Remove the VERSION constant, it's cruft.
|
|
Oops
|
|
These are kinder and less exceptional than their
non-trying counterparts as generating exceptions
is expensive for common EAGAIN errors.
|
|
It can be local variable
|
|
It could work...
|
|
Oops :x
|
|
It's only available when compiled with libffi.
|
|
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.
|
|
|
|
DL in Ruby 1.9 isn't the same
|
|
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.
|
|
|
|
For completeness, the LGPLv3 remains the preferred license.
|
|
Maybe people will just upgrade to newer systems eventually.
|
|
If it's not clear, we hate HTML.
|
|
ref: http://mid.gmane.org/AANLkTimNcWKqNSbD5GL76Z9rS3Gfi3uGusPksD2Eo+=P@mail.gmail.com
|
|
POSIX_MQ#notify(&block) mostly sucks.
|
|
No need to waste indentation and make eyes wander.
|
|
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.
|
|
While the old URLs still work, bogomips.org went on a URL diet
|
|
These cannot be cast to void since its value is
meaningful.
|
|
Not all systems can convert POSIX_MQ to IO objects.
|
|
This makes us explicitly compatible with GPLv2-only programs.
|
|
Some ancient systems don't support mq_timedsend and
mq_timedreceive but somehow manage to support other POSIX
mq_* functions.
|