Coro

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

          even better performance...).

6.05 Thu Aug  4 21:36:36 CEST 2011
	- blush, condvar values would not be propagated from send to recv anymore
          (reported by Chip Salzenberg).
	- use exponential increase for the readline buffer length in
          Coro::Handle. also reduce initial allocation to 1020 from 4096 bytes.

6.04  Wed Aug  3 17:15:45 CEST 2011
	- use even more efficient and more compatible condvars for
          compatibility to AnyEvent 6.x :)
        - more inconsequential ecb.h updates.

6.03  Wed Aug  3 11:41:30 CEST 2011
	- change how Coro patches AnyEvent condvars for compatibility to
          AnyEvent 6.x.
	- update ecb.h, to no longer include <pthread.h> in case WinNT.h
          hasn't been included.

6.02  Wed Jul 13 04:35:19 CEST 2011
	- "improve portability to Gentoo" - gentoo manages to put perl variables
          in memory areas that are farther than 2gb apart, which the jit couldn't
          handle and barfed. now it's just a bit slower on gentoo and similar
          systems.

6.01  Sun Jul  3 12:31:14 CEST 2011
	- workarounds are good, but the test for whether pthreads are used
          was not good. this one should be better.
        - check differently whether gcc generates cfi instructions itself.

6.0   Wed Jun 29 19:43:35 CEST 2011
	- INCOMPATIBLE CHANGE: unreferenced coro objects will now be
          destroyed and cleaned up automatically (e.g. async { schedule }).
        - implement a JIT compiler for part of the thread switch code,
          which gives a 50% speed improvement on threaded perls, and
          about 4% on non-threaded perls (so threaded perls now finally
          reach about half the speed of non-threaded perls).
        - slightly modernise Coro::Intro, add section about rouse functions.
        - avoid DEFSV and ERRSV, giving another 10% improvement
          in thread switching.
        - Coro::State->is_destroyed is now called is_zombie.
        - implement a Coro->safe_cancel method that might fail, but
          cancels in a "safer" way if it succeeds.
        - add preliminary support for DEBUGGING perls.
        - get rid of two hash-accesses when initialising a new Coro - this
          speeds up coro creation by almost a factor of two.
        - croak when a coro that is being cancelled tries to block
          (e.g. while executing a guard block), instead of crashing or
          deadlocking.
        - use a more robust and also faster method to identify Coro::State
          objects - speeds up everything a bit.
	- implement Coro->cancel in XS for a 20% speed improvement, and to
          be able to implement mutual cancellation.
	- speed up context switches by a percent or two by more efficiently
          allocating context stack entries.
        - implement Coro->join and Coro->on_destroy in XS for a speedup and
          a reduction in memory use.
        - cancelling a coro while it itself is cancelling another coro is
          now supported and working, instead of triggering an assertion.
	- be a bit more crash-resistant when calling (buggy) on_destroy
          callbacks (best effort).
        - move on_destroy into the slf_frame, to allow extension slf
          functions to have destructors.
        - get rid if coro refcounting - simply crash in other interpreter
          threads by nulling the pointers on clone.
        - simplify warn/die hook handling when loading Coro - the convoluted
          logic seems to be no longer neccessary.
        - use libecb instead of our own home-grown gcc hacks.
        - document alternatives to Coro::LWP. Please use them :)
        - work around another mindless idiotic NEEDLESS bug in openbsd/mirbsds
          sigaltstack. Really. wine suffers from it, erlang suffers from it,
          and it's known since at least 2006.

5.372 Wed Feb 23 06:14:30 CET 2011
	- apparently mingw doesn't provide a working gettimeofday, try to
          work around that by relying on Time::HiRes (indirectly brought to
          my attention by Max Maischein).
        - fix some portability issues when Time::HiRes was used.

5.371 Mon Feb 21 14:36:08 CET 2011
	- backport to windows process emulation code again.

5.37  Sat Feb 19 07:49:44 CET 2011
	- add a big "Coro thread life cycle" section to "man Coro".
	- try a tentative workaround against the breakage that 5.13 has
          introduced without depreciation period. sigh.
        - no longer use Time::HiRes if gettimeofday is available, which
          saves quite a lot of memory.

5.36  Sun Feb 13 05:33:41 CET 2011
	- automatically load Coro::Channel, Coro::RWLock, Coro::Semaphore,
          Coro::SemaphoreSet, Coro::Signal and Coro::Specific on first "new"
          method call.
        - undocument Coro::Timer::sleep and obsolete whole module.
        - optimise Coro::Timer::timeout memory and cpu usage.
        - slightly updated Coro::Intro for recent changes.
        - do not initialise PL_dirty anymore.

5.25  Thu Nov 11 01:08:39 CET 2010
	- try a different approach on netbsd - netbsd 5 finally has marginally
          working pthreads, but still broken ucontext/sigaltstack.
        - openbsd 4.8 finally got their act together, Coro works out of the box
          with asm, setjmp and pthreads (no change, just informational).

5.24  Sat Oct 23 11:27:12 CEST 2010
	- port to the EV 4.0 API.
	- work around bugs in mingw32, making strawberry perl work
          out of the box.
	- correctly modify Coro::AIO function prototypes
          so that they reflect the "no optional parameters" rule.
	- "ported" libcoro to C++.

5.23  Mon May 17 18:50:42 CEST 2010
	- be more resistant to ordering changes when initialising
          Coro::AnyEvent, Coro::EV and Coro::Event (reported by Matthias
          Waldorf).
	- document that perl 5.12 deliberately removed support for cloning.

5.22  Wed Apr 14 03:55:35 CEST 2010
	- correctly return udnef on errors in Coro::Handle::read/write
          (testcase by Marc Mims).
	- convert Coro::Util into a "perl compatibility wrapper" - the functions
          are less useful now, but are drop-in replacements for existing
          functions, listing better alternatives in the documentation. This also
          fixes a bug in Coro::LWP which naively substituted Socket::inet_aton
          with Coro::Util::inet_aton.
        - do not override $Coro::idle unconditionally in Coro.pm, as other
          modules could have provided their own idle coro already
          (for exmaple, Coro::AnyEvent).
	- fix Coro::Util::gethost* functions.
        - Coro::Timer corretcly exports it's symbols (reported by Hideki Yamamura).

5.21  Wed Dec 16 07:19:51 CET 2009
        - automatically load Coro::AnyEvent when AnyEvent and Coro are used
          together.
        - add some examples on how to combine other event loops with Coro in
          Coro::AnyEvent, and how to run it (and not to block). Seems to be
          the most common source of confusion.
        - try to catch people naively blocking in an event callback.
        - work around the perl filehandle bug issue in conjunction with
          older common::sense (as indirectly pointed out by ZSystem).
	- clarify the "not from signal handlers" section.

5.2   Sun Oct  4 14:54:24 CEST 2009
        - Coro::Storable destroyed the prototypes of the functions it wrapped.
        - export rouse_cb and rouse_wait by default now.
        - fix various prototype mismatches in Coro::AnyEvent and Coro::Handle.
        - new method $state->swap_sv.
        - added section on "windows process emulation" to the manpage,
          after a not-so-fruitful (nor-friendly) "discussion" with chip
          salzenberg (discussion implies arguments, but his only arguments
          were ad-hominems, one wonders why he started it in the first
          place). I hope this explains it well enough for him to understand,
          and maybe well enough for others to understand.
        - use common::sense everywhere now.
        - idle callbacks are no longer supported, use idle coros instead.
        - print a thread listing when a deadlock is detected.

5.17  Sat Aug 22 23:09:31 CEST 2009
	- work around a bug in the perl debugger causing crashes
          when running under the debugger by marking _pool_handler as nodebug.
	- speed up Coro::async considerably.
        - try some hacks to get netbsd to work "more often" - their broken
          setjmp/longjmp, ucontext *and* phtreads are really hard on Coro.
        - convert Coro to AE 5.0 API.

5.162 Tue Jul 28 04:04:03 CEST 2009
	- perl 5.8.2 is now minimum requirement.
        - skip t/19_handle.t on broken windows perls.

5.161 Wed Jul 22 04:47:38 CEST 2009
	- Coro::AnyEvent::poll could have a different prototype when EV was
          used as backend (analyzed by Tatsuhiko Miyagawa).
	- Coro::AnyEvent errornously initialised the event loop when loaded,
          not on demand.
        - try to workaround rare */t/01_unblock.t failures.

5.16  Tue Jul 21 01:44:37 CEST 2009
	- Coro::AnyEvent failed to hook into the event loop
          when no threads had been readied between detecting
          the event loop and actually running it.
	- considerably speed up Coro::Select by taking avdantage
          of AnyEvent > 4.8 and some other optimisations.
        - implement paragraph readline mode in Coro::Handle
          (based on patches by Zsbán Ambrus).
        - replace WSAEINPROGRESS by WSAEWOULDBLOCK (reported
          and analyzed by Yasuhiro MATSUMOTO).
        - clarified libcoro license and copyright.
        - someone stole my EXTRA_META!!!
        - implement Coro::Select::patch_pp_sselect and it's brother,
          for hardcode select overriding.

5.151 Mon Jul  6 05:41:57 CEST 2009
	- backport to windows process emulation code again (patch by
          Yasuhiro MATSUMOTO).
        - slightly update Coro::MakeMaker.

5.15  Tue Jun 30 10:28:06 CEST 2009
	- deprecate Coro::Socket, document how to get ipv6 support via
          AnyEvent::Socket instead.
	- implement signal->wait ($cb) interface, similar to semaphores.
        - work around SvOK not supporting getmagic, so we have to getmagic
          to test for undef :/ (reported by Matthias Waldorf).
        - load Coro::AnyEvent in all modules using AnyEvent.
        - work around perl corrupting our internal data structures,
          reported by Tokuhiro Matsuno.
        - enable per-coroutine real and cpu time gathering
          (Coro::State::enable_times).

5.14  Wed Jun 24 01:37:48 CEST 2009
	- provide explicit functions to "cede" to the event loop in Coro::AnyEvent,
          as this seems to have been a difficult concept (poll, sleep, idle,
          idle_upto).
        - add Coro::AnyEvent::readable/writable functions.
	- clarify Coro::EV/Event/AnyEvent manpages.
        - free per-thread global scalars in the thread calling ->cancel, to

Changes  view on Meta::CPAN

          the passed file descriptors (testcase provided by pippijn).

5.13 Mon Dec 15 21:51:42 CET 2008
	- EXPERIMENTAL: implement dynamic winds (on_enter/on_leave).
	- don't set diehook to C<undef> but instead to NULL, to avoid
          spurious warnings.
        - fix a lot of bugs in Coro::SemaphoreSet.
        - Coro::SemaphoreSet will less often create a semaphore needlessly.
        - add Coro::SemaphoreSet::count and wait methods.
        - take advantage of the new Guard module.
        - deprecate Coro::guard.
        - try to fix the dreaded 01_unblock tests once more. I hate it when
          testsuites need more fixing than the code they are supposed to test.
        - croak in more cases when a required callback isn't resolvable.
        - fix some minor issues in Coro::State->call/eval.
        - use current coroutine context instead of a temporary one
          when temporarily switching to another coroutine.
        - do not call C-level on_destroy handlers during global destruction,
          to avoid needless segfaults.

5.12 Sun Dec  7 13:30:38 CET 2008
        - add default config for MirOS, which seems to be a bug-to-bug
          compatible fork of openbsd ("world domination by releasing
          openbsd cvs before the openbsd folks do it" or so :).
        - free_padlist did destroy the names pad, not good, but didn't
          seem to bother perl - this could fix issues such as eval ""
          inside a function called from multiple coroutines.
        - use a different method to detect destruction time.
        - be more careful when freeing padlists just before global
          destruction.
        - fixed and expanded the call/cc example.
        - renamed _terminate to _coro_run.
        - new method Coro::Channel->shutdown.
        - try pthreads on openbsd <4.4 (broken sigaltstack, will
          pthreads fare better?).
        - be less picky about destroying "a" running coroutine.

5.11 Tue Nov 25 21:49:05 CET 2008
	- DEBUGGING in 5.10.0 is a mess: it constantly flags perfectly
          working code with failed assertions, introducing more bugs than
          it fixes, requiring elaborate workarounds :(

5.1  Mon Nov 24 08:54:59 CET 2008
	- wrote a small introductory tutorial - Coro::Intro.
	- convert Coro::Timer, Coro::Select and Coro::Util to rouse API.
        - Coro::Select did errornously dup the file descriptors
          and didn't work with all AnyEvent backends.
        - Coro::Select wasn't imported correctly form Coro::LWP, causing blocking
          LWP data transfers.
        - disassociate c contexts from coro objects - this is agruably more
          correct, but mostly allows sharing of cctxs between coro and state
          objects, for added memory savings and speed increases.
        - bumped $Coro::POOL_RSS up to 32kb by default.
        - no longer set the optype to OP_CUSTOM, as B::* understandably
          doesn't like this very much (and we *are* a type of entersub).
        - implement state cloning, just to prove that call/cc can be done.
        - automatically load Coro::AnyEvent in Coro::Handle.
        - wrap ->cancel calls in eval inside Coro::Handle as EV watchers
          do not have this method (and don't need it either).
        - speed up generic anyevent methods in Coro::Handle by using rouse
          callbacks.
        - allow coroutines in $Coro::IDLE, speeding up Coro::AnyEvent and
          others. It also makes the debugger happier, as you can trace
          through the idle threads now.
        - add comppad_name* and hints ($^H, %^H) to per-thread variables.
        - eg/event was pretty broken.
        - better 5.8.6 compatibility.

5.0  Thu Nov 20 10:35:05 CET 2008
	- NEW ARCHITECTURE: use the latest 4.x version if you experience
          stability issues.
        - bump API version to 7 - all dependents must be recompiled.
        - removed timed_* functions - they were not being used anyways
          and should be replaced by a more generic mechanism -
          and were annoying to support anyways :)
        - removed SemaphoreSet's waiter method - use sem method instead.
        - Coro::Semaphore->adjust didn't correctly wake up enough waiters.
        - async_pool did free a scalar value twice
          ("Attempt to unreference...").
        - fix a longstanding bug where calling terminate on a coro that
          was waiting for a semaphore that was just becoming available
          would cause a deadlock (semaphore would get into a state where
          it was available but waiters were still blocked).
        - calling throw on a coroutine that is waiting for a semaphore will
          no longer make it acquire the semaphore (and thus leak a count).
        - perl's process emulation is now not even theoretically supported
          anymore.
        - new functions Coro::rouse_cb and Coro::rouse_wait for easier
          conversion of callback-style to blocking-style.
        - new methods $coro->schedule_to and ->cede_to, to specifically
          schedule or cede to a specific coroutine.
        - new function Coro::Semaphore::wait.
        - use named constants in Coro::Channel (Richard Hundt).
        - directly patch the entersub opcode calling SLF functions (cede,
          transfer and so on). this does speed up context switching, but
          more importanly, it frees us from the hardcoded behaviour of
          entersub, so we might actually be able to return something from
          those functions and atcually create new ones.
        - take advantage of __builtin_frame_address on gcc.
        - expose THX in coroapi (not sure whether this was a wise decision,
          as "threaded" perls are running at half speed anyways).
        - implement execute_slf (schedule-like-function) interface that makes
          it possible to implement schedule-like-functions in XS.
        - use new SLF interface to massively speed up Coro::EV by roughly a
          factor of two.
        - used new SLF interface to massively speed up Coro::Semaphore by a
          factor of three.
        - used new SLF interface to speed up Coro::AIO by roughly a factor of
          four and reduce its memory usage considerably.
        - implement Coro::SemaphoreSet purely in terms of Coro::Semaphore,
          for a nice speedup and vastly more correct behaviour. Also implement
          a new method "sem" to get at the underlying semaphore object.
        - implement Coro::Channel in terms of Coro::Semaphore, for a moderate
          (in comparison) 20-40% speedup.
        - used new SLF interface to reimplement Coro::Signal gaining
          some unknown (because I was too lazy), but certain, speedup, and also
          making signals reliable for the first time.
        - used new SLF interface and other optimisations to speed up async_pool
          by a factor of two. It also doesn't rely on perl's exception mechanism
          to exit anymore. The overhead for terminating an async_pool, coro over
          a normal async is now very small.



( run in 0.559 second using v1.01-cache-2.11-cpan-39bf76dae61 )