Revision history for IO-Async
0.46_001 BUGFIXES:
* Fix race condition in t/33process.t (RT75573)
* Ensure Timer->stop doesn't fail if the timer isn't running
(RT75571)
* Possibly-fix some cygwin test failures (RT71706)
* Ensure that 'passive' getaddrinfo hint is handled in both
synchronous and numeric cases
0.46 ADDITIONS:
* IO::Async::Routine + IO::Async::Channel
* IO::Async::Process->kill method
CHANGES:
* Use Socket 1.93 rather than dual-dependency logic on
Socket::GetAddrInfo
* Rewrote ::Function based on ::Routine and ::Channel
* Cleaner refcount behaviour in ::Process
* ::Process no longer waits for EOF condition on write-only pipes
* Don't unit-test the reading end of a pipe for HUP condition
* Documentation updates
* Removed documentation for long-since deprecated $loop->detach_child
and ->detach_code methods
0.45 CHANGES:
* Added Timer->is_expired predicate, remove_on_expire parameter
(RT71767)
BUGFIXES:
* Use fd3/4 in ::Function rather than STDIN/STDOUT, to avoid
corrupting the return channel if the body function prints (RT72448)
* Better error detection around setuid/setgid/setgroups (RT72407)
* IO::Handle->binmode is not available as a method before perl 5.12;
use CORE::binmode() instead
* Don't attempt to invoke a missing on_notifier callback in
Loop->listen (RT71768)
0.44 CHANGES:
* Allow Process to have sockets as handles; including datagram
sockets
BUGFIXES:
* Extract TimeQueue entiries before firing them, in case they do
something weird like cancelling themselves (RT70231)
* Test dollarbang for EWOULDBLOCK which might help MSWin32
* Cope correctly with Function handles in the presence of -CS or
PERL_UNICODE=S
0.43 CHANGES:
* Allow IO::Async::Notifier to be used as a non-principle mixin class
* Provide Notifier->loop accessor
* Added (still-experimental) Notifier debug features
* Deleted various deprecated features:
+ Notifier to Handle upgrade
+ Loop->enable_childmanager, Loop->disable_childmanager
* Print deprecation warnings on Loop->detach_code, Loop->detach_child
* Minor improvements to LoopTests
0.42 BUGFIXES:
* Test Stream encoding errors on a sequence which still returns
U+FFFD immediately on 5.14.0 (RT69020)
0.41 CHANGES:
* Support 'encoding' parameter in IO::Async::Stream
* Allow IO::Async::Stream->write with an empty string, for the
side-effect of setting an on_flush handler
* Support 'first_interval' parameter to IO::Async::Timer::Periodic
* Expanded documentation of timers
BUGFIXES:
* Explicitly 'use IO::Handle;'
0.40 ADDITIONS:
* Added IO::Async::FileStream - RT66520
* Added IO::Async::Stream 'close_on_read_eof' parameter
* Added IO::Async::Listener 'on_accept_failure' event
CHANGES:
* Allow Loop->listen to be extended via extensions, similar to
->connect
* Autoflush streams used in Function::Worker objects by default
* Default Resolver to idle_timeout=30, min_workers=0
BUGFIXES:
* Don't convert method names to CODErefs during _capture_weakself as
it breaks dynamic dispatch and code reload - RT65785
* Only calculate Timer::Periodic's next tick time if it actually has
a Loop
* Put primary GID first in a 'setgroups' list, otherwise some BSDs
get upset - RT65127
* Load getaddrinfo() from Socket or Socket::GetAddrInfo in
t/50resolver.t
* Remove the anonymous Listener from the Loop if Loop->listen fails
- RT66168
* Supply LocalPort => 0 to IO::Socket::INET constructor explicitly
during testing
0.39 CHANGES:
* Added IO::Async::Notifier 'notifier_name' parameter, which may be
used in debugging code in a later version
* Added IO::Async::Stream on_write_eof event
* Complain about unrecognised keys in IO::Async::Loop->watch_io and
IO::Async::Stream->write
BUGFIXES:
* Don't claim on_hangup supported except on those places we know it
will be (Linux, FreeBSD >= 8.0)
* Fixed race condition in t/41detached-code.t
* Fixed race condition in IO::Async::Function
0.38 ADDITIONS:
* IO::Async::Function
* IO::Async::Loop->notifiers accessor
CHANGES:
* Symbolic flags in IO::Async::Resolver as convenience for commonly
used flag constants
* Distribution now uses Test::Fatal rather than Test::Exception
* Resolver is now a subclass of Function, not DetachedCode
BUGFIXES:
* More robust detection of Socket vs Socket::GetAddrInfo
* Portability fix for ChildManager's FD_CLOEXEC flag
0.37 ADDITIONS:
* Handle->close_read, ->close_write
* Stream on_read_eof event
* extract_addrinfo conveniences for 'inet', 'inet6' and 'unix'
CHANGES:
* Allow Process filehandles to set up plain pipes without read/write
behaviour on the associated Stream
* Renamed Loop->unpack_addrinfo to ->extract_addrinfo
* Prepare for Socket::getaddrinfo() in core; prefer it to
Socket::GetAddrInfo::getaddrinfo()
0.36 ADDITIONS:
* IO::Async::Process
CHANGES:
* Allow prequeuing of ->write data in Stream
* Check that signal handling remains properly deferred in LoopTests
* Miscellaneous documentation and examples updates
BUGFIXES:
* RT 64558 - getaddrinfo() returns duplicate addresses for localhost
* Don't rely on having NI_NUMERICSERV
0.35 ADDITIONS:
* Loop->unpack_addrinfo
CHANGES:
* Recognise 'inet' and 'unix' as socket families
* Recognise 'stream', 'dgram' and 'raw' as socket types
* Recognise nicer HASH-based addrinfo layout in ->connect and
->listen
* Listener now has on_stream / on_socket as full events, not just
CODEref parameters
* Make Resolver->getaddrinfo try synchronously if given numeric names
* Make Resolver->getnameinfo run synchronously if given
NI_NUMERICHOST|NI_NUMERICSERV flags
* Try to combine small data buffers from Stream->write calls if
possible
BUGFIXES:
* Linefeed in die case of getaddrinfo_hash to preserve exeception
string
* Deconfigure Protocol->transport after it is closed
0.34 ADDITIONS:
* New Notifier methods ->_replace_weakself, ->maybe_invoke_event,
->maybe_make_event_cb
* New Protocol method ->connect
* New subclass Protocol::LineStream
* Direct Resolver->getaddrinfo and ->getnameinfo methods
CHANGES:
* New Protocol::Stream->new( handle => $io ) parameters, which
creates an IO::Async::Stream to use as a transport
* Renamed Loop->detach_child to Loop->fork
* Pass errno values into ->connect on_connect_error and
->listen on_listen_error
* Support timeouts on Resolver operations
* Allow direct access to Resolver via Loop->resolver
BUGFIXES:
* Make sure Protocol::Stream handles writersub and on_flush callback
0.33 ADDITIONS:
* Allow watching child PID 0, to capture every child process exit
* $loop->time accessor
* Stream->write( sub { ... } ) dynamic stream generation
* Stream->write( $data, on_flush => sub { ... } ) callback
CHANGES:
* IO::Async::Loop->new magic constructor now caches the loop; useful
for wrapping modules, other event system integration, etc..
0.32 ADDITIONS:
* IO::Async::Timer::Absolute
* Listener accessors for ->sockname, ->family, ->socktype
CHANGES:
* Implement and document Handle's want_{read,write}ready parameters
* Rearranged documentation for Notifier subclasses; new EVENTS
sections
* Correct location for #io-async channel on irc.perl.org
0.31 ADDITIONS:
* Delegate Protocol->close method and on_closed continuation to its
transport object
* Stream->new_for_stdin, ->new_for_stdout, ->new_for_stdio
* Support Listener->new( handle => $fh )
* IO::Async::PID notifier subclass
CHANGES:
* Better documentation of Listener and Connector addr and addrs
arguments
BUGFIXES:
* INADDR_ANY/INADDR_LOOPBACK fixes inside BSD jails with restricted
networking
0.30 ADDITIONS:
* Added IO::Async::Socket
* Added IO::Async::Protocol and ::Protocol::Stream
* Added on_stream and on_socket continuations for $loop->connect and
Listener
CHANGES:
* Emulate socketpair(AF_INET,...)
* Allow IO::Async::Stream 's read_len and write_len to be configured
per-instance
* Allow a Stream object without an on_read handler
BUGFIXES:
* Cope with exceptional-state sockets in Loop::Poll
0.29 CHANGES:
* Don't require 'CODE' refs for callbacks/continations; this allows
the use of CODEref objects, &{} operator overloads, or other things
that are callable
* Implement 'read_all' and 'write_all' options on IO::Async::Stream
* Allow IO::Async::Stream subclasses to override on_closed
BUGFIXES:
* Work around some OSes not implementing SO_ACCEPTCONN
* Ensure Handle's on_read_ready/on_write_ready callbacks also take a
$self reference
0.28 BUGFIXES:
* Ensure that Timer->start returns $self even when not in a Loop
* Accept bare GLOB refs as IO::Async::Listener handles; upgrade them
to IO::Socket refs if required
* Applied documentation patch from RT 55375 - thanks to
Chris Williams
0.27 CHANGES:
* Implement 'autoflush' option on IO::Async::Stream
BUGFIXES:
* Avoid $_ breaking stored signal handler references when invoking
them
* Ignore EINTR from sysread/syswrite
* More reliable socket address tests - don't rely on uninitialised
padding bytes between struct members
0.26 BUGFIXES:
* Connect to INADDR_LOOPBACK rather than INADDR_ANY during
t/24listener.t; hopefully fixes FAILs on OpenBSD
* Fix IO::Async::Stream during combined read/write-ready of a closed
stream
0.25 CHANGES:
* Accept 'stream'/'dgram'/'raw' as symbolic shortcuts for socket
types in connect/listen operations - avoids 'use Socket'
* Accept IO::Handle-derived objects in ChildManager setup keys as
well as raw GLOB refs
BUGFIXES:
* Various changes to test scripts to hopefully improve portability or
reliability during smoke tests
0.24 ADDITIONS:
* Timer subclasses - Countdown and Periodic
* Idleness event watching via low-level 'watch_io/unwatch_io' methods
and higher-level 'later' method
* Added the missing 'unwatch_child' method
* Shareable acceptance testing suite for IO::Async::Loop subclasses
for better testing in subclass implementations
CHANGES:
* More future-proof API version checking for subclasses - requires
subclasses to declare their version.
### pre-0.24 Loop subclasses are no longer compatible. ###
* Entirely remove the need to $loop->enable_childmanager by calling
waitpid() in 'watch_child'.
0.23 CHANGES:
* Rearranged IO::Async::Listener to be a constructable Notifier
suclass
* Allow Signal, Timer and Listener to act as base classes as well as
standalone with callbacks
* Renamed IO::Async::Loop::IO_Poll to ::Poll; created transparent
backward-compatibility wrapper
0.22 CHANGES:
* Added tcp-proxy.pl example
* More documentation on IO::Async::Notifier subclass-override methods
* Documented that IO::Async::MergePoint is just an Async::MergePoint
* Various small updates to keep CPANTS happy
BUGFIXES:
* Don't test Async::MergePoint locally as it's now a separate dist,
and the tests here were reporting false negatives.
0.21 CHANGES:
* Added "use warnings" to all modules
* Created Notifier->configure method to allow changing properties of
a Notifier or subclass after construction
* New 'examples' dir with some small example scripts
BUGFIXES:
* More robust timing tests to avoid some spurious test failures due
to busy testing servers or other non-issues
0.20 CHANGES:
* Major reworking of underlying Loop implementation:
+ Unified low-level IO, timer and signal watches as callbacks
+ Split IO handle parts of Notifier into new IO::Async::Handle
class
+ Created Timer and Signal subclasses of Notifier
These changes will require a compatible upgrade to the underlying
Loop implementation.
* Hide SignalProxy and TimeQueue from CPAN's indexer, as they are
internal-only details that don't need exposing there.
* Loop magic constructor now warns if a specifically-requested class
is not available
* Allow multiple attachment of signals via Loop->attach_signal or new
Signal objects
0.19 CHANGES:
* Allow control of Sequencer's pipelining
* Documentation fixes
* Allow Loop->run_child to take a 'setup' array
* Added 'setuid', 'setgid' and 'setgroups' child setup operations
* Support 'on_notifier' in Loop->listen
BUGFIXES:
* carp before return in Stream->write so it actually prints
* Ensure Streams still work after being closed and reopened by
->set_handle
* If IO::Socket->new() fails, try again with generic ->socket
(makes IPv6 work on platforms without IO::Socket::INET6)
0.18 CHANGES:
* Allow Sequencer to be a base class as well as using constructor
callbacks
* Use signal names from Config.pm rather than relying on POSIX.pm.
Covers more signals that way
BUGFIXES:
* Gracefully handle accept() returning EAGAIN
* Fixed handling of IO::Socket->getsockopt( SOL_SOCKET, SO_ERROR )
0.17 CHANGES:
* Added Stream->close_when_empty and ->close_now. Added docs
* Added OS abstractions of socketpair() and pipe()
* Many documentation changes and updates
BUGFIXES:
* Properly handle stream read/write errors; close immediately rather
than deferring until empty.
* Various CPAN testers somketest bug fixes
* Fixed http://rt.cpan.org/Ticket/Display.html?id=38476
0.16 ADDITIONS:
* Loop->requeue_timer()
* Magic constructor in IO::Async::Loop which tries to find the best
subclass
* 'chdir' and 'nice' ChildManager operations
CHANGES:
* Make sure that top-level objects are refcount-clean by using
Test::Refcount, and Scalar::Util::weaken()
BUGFIXES:
* Keep perl 5.6.1 happy by not passing LocalPort => 0 when
constructing IO::Socket::INETs
* Pass the Type option to IO::Socket::INET constructor in test
scripts
0.15 REMOVALS:
* IO::Async::Set subclasses and IO::Async::Buffer have now been
entirely removed.
CHANGES:
* Support handle-less IO::Async::Sequencer, like ::Notifier
* Set SO_REUSEADDR on listening sockets by default
* Allow Loop->listen() on a plain filehandle containing a socket
* No longer any need to explcitly call Loop->enable_childmanager
BUGFIXES:
* IO::Async::Loop->_adjust_timeout actually works properly
* Notifier->close() only runs on_closed callback if it actually
closed - allows for neater cross-connected Notifiers
* Made Notifier->want_{read,write}ready more efficient
* Notifier->close() on a child notifier works
* Loop->listen() should take the first successful address, rather
than trying them all
0.14 REMOVALS:
* IO::Async::Set subclasses and IO::Async::Buffer are now completely
deprecated. Any attempt to use them will fail immediately.
ADDITIONS:
* 'keep' ChildManager operation
* IO::Async::Test::wait_for_stream()
* Loop->listen()
* IO::Async::Sequencer class
CHANGES:
* Support dynamic swapping of temporary 'on_read' handlers in Stream
* Now requires Socket::GetAddrInfo >= 0.08
* Further shortcuts in ChildManager setup keys - IO references and
simple string operation names
* Support handle-less IO::Async::Notifiers that have IO handles added
to them later
* Allow 'setup' key to Loop->detach_code()
* Various documentation updates
BUGFIXES:
* Allow the same filehandle to be 'dup'ed more than once in
ChildManager
0.13 CHANGES:
* Flush all awaiting data from Stream when it becomes writeready
* Supply a real IO::Async::Test module to allow testing in 3rd party
distros
* Various documentation fixes
BUGFIXES:
* Don't rely on STDOUT being writable during test scripts
0.12 CHANGES:
* Allow Notifiers that are write-only.
* Added ChildManager->open and ->run; with ->open_child and
->run_child on the containing Loop.
* Moved IO::Async::Loop::Glib out to its own CPAN dist, to
simplify Build.PL and testing scripts
BUGFIXES:
* Make sure to "use IO::Socket" in IO::Async::Connector
* Pass 'socktype' argument to ->connect during testing
0.11 INCOMPATIBLE CHANGES:
* Renamed IO::Async::Set::* to IO::Async::Loop::* - provided
backward-compatibility wrappers around old names.
IO::Async::Set::GMainLoop has become IO::Async::Lib::Glib
* Renamed IO::Async::Buffer to IO::Async::Stream - provided backward-
compatibility wrapper around old name.
* Loop->get_childmanager() and ->get_sigproxy() no longer allowed
CHANGES:
* Extended ->loop_once() and ->loop() feature out to all
IO::Async::Loop classes
* Added IO::Async::Resolver and IO::Async::Connector, plus Loop
integration
* Allow write-only IO::Async::Notifiers that have no read handle or
readiness callback.
0.10 INCOMPATIBLE CHANGES:
* Renamed events and methods in IO::Async::Notifier to better fit the
naming scheme of normal Perl handles. Backward-compatibility hooks
are currently provided, but will be removed in a later release. Any
code using the old names should be updated
CHANGES:
* Allow DetachedCode to have multiple back-end worker processes.
* Control if a back-end worker exits when the code "die"s
* Added 'close()' method on Notifiers/Buffers. Sensible behaviour on
buffers with queued data to send
* Reset %SIG hash in ChildManager->detach_child()
BUGFIXES:
* Clean up temporary directory during testing
* Shut down DetachedCode workers properly on object deref
* Better handling of borderline timing failures in t/11set-*.t
* Close old handles before dup2()ing new ones when detaching code
* Various other minor test script improvements
0.09 CHANGES:
* Added TimeQueue object and integration with IO::Async::Set and
subclasses.
* Added MergePoint object
* Added 'on_closed' callback support to IO::Async::Notifier
BUGFIXES:
* Don't depend on system locale when checking string value of $!
* Fixed test scripts to more closely approximate real code behaviour
in the presence of poll() vs. deferred signal delivery
0.08 CHANGES:
* Added ChildManager->detach_child() method
* Added DetachedCode object
BUGFIXES:
* Better tests for presence of Glib to improve test false failures
* More lenient times in test script 11set-IO-Poll-timing to allow for
variances at test time
* Avoid bugs in post_select()/post_poll() caused by some notifier
callbacks removing other notifiers from the set
0.07 BUGFIXES:
* Avoid race condition in t/30childmanager.t - wait for child process
to actually exit
* Avoid race condition in IO::Async::ChildManager->spawn() by waiting
for SIGCHLD+pipe close, rather than SIGCHLD+pipe data
0.06 CHANGES:
* Allow 'env' setup key to ChildManager->spawn() to change the
child's %ENV
* Updated the way some of the ->spawn() tests are conducted. There
seems to be massive failures reported on cpantesters against 0.05.
These changes won't fix the bugs, but should assist in reporting
and tracking them down.
BUGFIXES:
* Don't rely on existence of /bin/true - test for /usr/bin/true as
well, fall back on "$^X -e 1"
* Avoid kernel race condition in t/32childmanager-spawn-setup.t by
proper use of select() when testing.
0.05 CHANGES:
* Added ChildManager object
* Added singleton storage in IO::Async::Set to store a SignalProxy or
ChildManager conveniently
BUGFIXES:
* Workaround for a bug in IO::Poll version 0.05
0.04 CHANGES:
* Added dynamic signal attach / detach methods to SignalProxy
* Buffer now has on_read_error / on_write_error callbacks for
handling IO errors on underlying sysread()/syswrite() calls
0.03 CHANGES:
* No longer build_requires 'Glib' - print a warning if it's not
installed but carry on anyway.
* IO_Poll->loop_once() now returns the result from the poll() call
* Added concept of nested child notifiers within Notifier object
BUGFIXES:
* Fix to test scripts that call IO_Poll's loop_once() with a timeout
of zero. This can cause a kernel race condition, so supply some
small non-zero value instead.
0.02 INCOMPATIBLE CHANGES:
* Event methods/callback functions now called "on_*" to distinguish
them
* Callback functions now pass $self as first argument to simplify
called code
CHANGES:
* Improved POD in Notifier.pm and Buffer.pm
BUGFIXES:
* GMainLoop.pm - return 1 from callbacks so that glib doesn't remove
our IO sources
* GMainLoop.pm - make sure re-asserting want_writeready actually adds
the IO source again
0.01 First version, released on an unsuspecting world.