ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Coro/Changes
(Generate patch)

Comparing Coro/Changes (file contents):
Revision 1.436 by root, Wed Nov 19 02:56:15 2008 UTC vs.
Revision 1.613 by root, Tue Mar 5 18:37:43 2013 UTC

1Revision history for Perl extension Coro. 1Revision history for Perl extension Coro.
2 2
3TODO: should explore PerlIO::coroaio (perl leaks like hell). 3TODO: should explore PerlIO::coroaio (perl leaks like hell).
4TODO: maybe implement a default message channel, very much like Erlang's 4TODO: channel->maxsize(newsize)?
5 actor model (which is cool in a lot of important aspects (failures!), 5TODO: __GCC_HAVE_DWARF2_CFI_ASM
6 but very lacking in others (higher level ipc)).
7 6
8TODO: testcancel 7 - manually copy existing __DIE__ and __WARN__ handlers so
9TODO: guard as SLF - to avoid deadlocks. 8 they lose their magic and will not cause segfaults later
10 - avoid deadlock in Coro::Channel if maxsize == 1 (Richard Hundt). 9 (testcase by Andrey Sagulin).
10 - improved Coro::State documentation a bit.
11 - Coro::Debug::command now flushes the output.
12 - add hack detection code for x32 abi, because the braindead slugs
13 who designed that made it look exactly like x86_64 without
14 providing proper compile time symbols to test for it. as a result,
15 this detection cannot work reliably.
16 - valgrind stack registering was broken.
17 - do not rely on Time::HiRes anymore in Coro::Debug.
11 18
125.0 196.23 Fri Dec 7 23:36:37 CET 2012
20 - use experimental fiber implementation on native windows
21 perls.
22 - use sizeof (void *) as multiplication factor for stack sizes,
23 to accomodate the totally braindamaged microsoft 64 bit "os".
24 - changed verifier host from win2k-ap510-32 to win7-sp516-32/64.
25 activeperl 5.16 crashes when PerlIO_define_layer is called due
26 to some bug in the perl dll, strawberry perl at least passes
27 the testsuite.
28 - implement Coro::Handle->peeraddr/host/port, for slightly
29 improved compatibility with LWP.
30 - implement 5.17 compatibility by almost blindly applying a
31 good-looking patch by Father Chrysostomos.
32 - move stack management functions into libcoro 3.
33 - libcoro version 3 "released".
34 - support magic values as timed_io_once args.
35 - recommend AnyEvent 7+ or EV 4+, also require EV
36 version 4 or newer for Coro::EV.
37
386.10 Tue Oct 9 01:14:27 CEST 2012
39 - updated ecb.h, it had a typo that caused it to not compile on many
40 big endian systems (reported by many people).
41 - disable memory fences in ecb.h to improve portability.
42
436.09 Sat Oct 6 23:25:02 CEST 2012
44 - Coro::EV I/O watchers were not interruptible by exceptions
45 (Coro::State::throw) (testcase by sten).
46 - ->throw now puts threads into the ready queue, as this seems to
47 be expected by existing code, and code that doesn't cope with spurious
48 wakeups needs fixing anyway.
49 - use fd -1 in mmap.
50 - cast I32 to int in error message printf.
51 - warn about broken so-called "hardened" kernels.
52
536.08 Fri Apr 13 12:05:47 CEST 2012
54 - be more aggressive about exiting like perl does - formerly,
55 exiting from the non-main thread would not execute END blocks.
56
576.07 Fri Nov 11 21:21:48 CET 2011
58 - work around a bug in PerlIO (setting $SIG{__WARN__} to a PVCV).
59 - update ecb.h.
60
616.06 Mon Aug 8 23:59:48 CEST 2011
62 - cygwin unfortunately patches the stack at runtime, so we use the pthreads
63 backend, which is an order of magnitude slower. unfortunately, cygwins
64 pthread implementation isn't very complete either, so allocate the stack
65 twice just to be sure.
66 (note: cygwin also enables mymalloc, which is NOT THREADSAFE ON WINDOWS,
67 in its ithreaded perl - best recompile cygwin and use the 'w'indows
68 backend for much better performance. also disable ithreads for
69 even better performance...).
70
716.05 Thu Aug 4 21:36:36 CEST 2011
72 - blush, condvar values would not be propagated from send to recv anymore
73 (reported by Chip Salzenberg).
74 - use exponential increase for the readline buffer length in
75 Coro::Handle. also reduce initial allocation to 1020 from 4096 bytes.
76
776.04 Wed Aug 3 17:15:45 CEST 2011
78 - use even more efficient and more compatible condvars for
79 compatibility to AnyEvent 6.x :)
80 - more inconsequential ecb.h updates.
81
826.03 Wed Aug 3 11:41:30 CEST 2011
83 - change how Coro patches AnyEvent condvars for compatibility to
84 AnyEvent 6.x.
85 - update ecb.h, to no longer include <pthread.h> in case WinNT.h
86 hasn't been included.
87
886.02 Wed Jul 13 04:35:19 CEST 2011
89 - "improve portability to Gentoo" - gentoo manages to put perl variables
90 in memory areas that are farther than 2gb apart, which the jit couldn't
91 handle and barfed. now it's just a bit slower on gentoo and similar
92 systems.
93
946.01 Sun Jul 3 12:31:14 CEST 2011
95 - workarounds are good, but the test for whether pthreads are used
96 was not good. thisone should be better.
97 - check differently whether gcc generates cfi instructions itself.
98
996.0 Wed Jun 29 19:43:35 CEST 2011
100 - INCOMPATIBLE CHANGE: unreferenced coro objects will now be
101 destroyed and cleaned up automatically (e.g. async { schedule }).
102 - implement a JIT compiler for part of the thread switch code,
103 which gives a 50% speed improvement on threaded perls, and
104 about 4% on non-thraeded perls (so threaded perls now finally
105 reach about half the speed of non-threaded perls).
106 - slightly modernise Coro::Intro, add section about rouse functions.
107 - avoid DEFSV and ERRSV, giving another 10% improvement
108 in thread switching.
109 - Coro::State->is_destroyed is now called is_zombie.
110 - implement a Coro->safe_cancel method that might fail, but
111 cancels in a "safer" way if it succeeds.
112 - add preliminary support for DEBUGGING perls.
113 - get rid of two hash-accesses when initialising a new Coro - this
114 speeds up coro creation by almost a factor of two.
115 - croak when a coro that is being cancelled tries to block
116 (e.g. while executing a guard block), instead of crashing or
117 deadlocking.
118 - use a more robust and also faster method to identify Coro::State
119 objects - speeds up everything a bit.
120 - implement Coro->cancel in XS for a 20% speed improvement, and to
121 be able to implement mutual cancellation.
122 - speed up context switches by a percent or two by more efficiently
123 allocating context stack entries.
124 - implement Coro->join and Coro->on_destroy in XS for a speedup and
125 a reduction in memory use.
126 - cancelling a coro while it itself is cancelling another coro is
127 now supported and working, instead of triggering an assertion.
128 - be a bit more crash-resistant when calling (buggy) on_destroy
129 callbacks (best effort).
130 - move on_destroy into the slf_frame, to allow extension slf
131 functions to have destructors.
132 - get rid if coro refcounting - simply crash in other interpreter
133 threads by nulling the pointers on clone.
134 - simplify warn/die hook handling when loading Coro - the convoluted
135 logic seems to be no longer neccessary.
136 - use libecb instead of our own home-grown gcc hacks.
137 - document alternatives to Coro::LWP. Please use them :)
138 - work around another mindless idiotic NEEDLESS bug in openbsd/mirbsds
139 sigaltstack. Really. wine suffers from it, erlang suffers from it,
140 and it's known since at least 2006.
141
1425.372 Wed Feb 23 06:14:30 CET 2011
143 - apparently mingw doesn't provide a working gettimeofday, try to
144 work around that by relying on Time::HiRes (indirectly brought to
145 my attention by Max Maischein).
146 - fix some portability issues when Time::HiRes was used.
147
1485.371 Mon Feb 21 14:36:08 CET 2011
149 - backport to windows process emulation code again.
150
1515.37 Sat Feb 19 07:49:44 CET 2011
152 - add a big "Coro thread life cycle" section to "man Coro".
153 - try a tentative workaround against the breakage that 5.13 has
154 introduced without depreciation period. sigh.
155 - no longer use Time::HiRes if gettimeofday is available, which
156 saves quite a lot of memory.
157
1585.36 Sun Feb 13 05:33:41 CET 2011
159 - automatically load Coro::Channel, Coro::RWLock, Coro::Semaphore,
160 Coro::SemaphoreSet, Coro::Signal and Coro::Specific on first "new"
161 method call.
162 - undocument Coro::Timer::sleep and obsolete whole module.
163 - optimise Coro::Timer::timeout memory and cpu usage.
164 - slightly updated Coro::Intro for recent changes.
165 - do not initialise PL_dirty anymore.
166
1675.25 Thu Nov 11 01:08:39 CET 2010
168 - try a different approach on netbsd - netbsd 5 finally has marginally
169 working pthreads, but still broken ucontext/sigaltstack.
170 - openbsd 4.8 finally got their act together, Coro works out of the box
171 with asm, setjmp and pthreads (no change, just informational).
172
1735.24 Sat Oct 23 11:27:12 CEST 2010
174 - port to the EV 4.0 API.
175 - work around bugs in mingw32, making strawberry perl work
176 out of the box.
177 - correctly modify Coro::AIO function prototypes
178 so that they reflect the "no optional parameters" rule.
179 - "ported" libcoro to C++.
180
1815.23 Mon May 17 18:50:42 CEST 2010
182 - be more resistant to ordering changes when initialising
183 Coro::AnyEvent, Coro::EV and Coro::Event (reported by Matthias
184 Waldorf).
185 - document that perl 5.12 deliberately removed support for cloning.
186
1875.22 Wed Apr 14 03:55:35 CEST 2010
188 - correctly return udnef on errors in Coro::Handle::read/write
189 (testcase by Marc Mims).
190 - convert Coro::Util into a "perl compatibility wrapper" - the functions
191 are less useful now, but are drop-in replacements for existing
192 functions, listing better alternatives in the documentation. This also
193 fixes a bug in Coro::LWP which naively substituted Socket::inet_aton
194 with Coro::Util::inet_aton.
195 - do not override $Coro::idle unconditionally in Coro.pm, as other
196 modules could have provided their own idle coro already
197 (for exmaple, Coro::AnyEvent).
198 - fix Coro::Util::gethost* functions.
199 - Coro::Timer corretcly exports it's symbols (reported by Hideki Yamamura).
200
2015.21 Wed Dec 16 07:19:51 CET 2009
202 - automatically load Coro::AnyEvent when AnyEvent and Coro are used
203 together.
204 - add some examples on how to combine other event loops with Coro in
205 Coro::AnyEvent, and how to run it (and not to block). Seems to be
206 the most common source of confusion.
207 - try to catch people naively blocking in an event callback.
208 - work around the perl filehandle bug issue in conjunction with
209 older common::sense (as indirectly pointed out by ZSystem).
210 - clarify the "not from signal handlers" section.
211
2125.2 Sun Oct 4 14:54:24 CEST 2009
213 - Coro::Storable destroyed the prototypes of the functions it wrapped.
214 - export rouse_cb and rouse_wait by default now.
215 - fix various prototype mismatches in Coro::AnyEvent and Coro::Handle.
216 - new method $state->swap_sv.
217 - added section on "windows process emulation" to the manpage,
218 after a not-so-fruitful (nor-friendly) "discussion" with chip
219 salzenberg (discussion implies arguments, but his only arguments
220 were ad-hominems, one wonders why he started it in the first
221 place). I hope this explains it well enough for him to understand,
222 and maybe well enough for others to understand.
223 - use common::sense everywhere now.
224 - idle callbacks are no longer supported, use idle coros instead.
225 - print a thread listing when a deadlock is detected.
226
2275.17 Sat Aug 22 23:09:31 CEST 2009
228 - work around a bug in the perl debugger causing crashes
229 when running under the debugger by marking _pool_handler as nodebug.
230 - speed up Coro::async considerably.
231 - try some hacks to get netbsd to work "more often" - their broken
232 setjmp/longjmp, ucontext *and* phtreads are really hard on Coro.
233 - convert Coro to AE 5.0 API.
234
2355.162 Tue Jul 28 04:04:03 CEST 2009
236 - perl 5.8.2 is now minimum requirement.
237 - skip t/19_handle.t on broken windows perls.
238
2395.161 Wed Jul 22 04:47:38 CEST 2009
240 - Coro::AnyEvent::poll could have a different prototype when EV was
241 used as backend (analyzed by Tatsuhiko Miyagawa).
242 - Coro::AnyEvent errornously initialised the event loop when loaded,
243 not on demand.
244 - try to workaround rare */t/01_unblock.t failures.
245
2465.16 Tue Jul 21 01:44:37 CEST 2009
247 - Coro::AnyEvent failed to hook into the event loop
248 when no threads had been readied between detecting
249 the event loop and actually running it.
250 - considerably speed up Coro::Select by taking avdantage
251 of AnyEvent > 4.8 and some other optimisations.
252 - implement paragraph readline mode in Coro::Handle
253 (based on patches by Zsbán Ambrus).
254 - replace WSAEINPROGRESS by WSAEWOULDBLOCK (reported
255 and analyzed by Yasuhiro MATSUMOTO).
256 - clarified libcoro license and copyright.
257 - someone stole my EXTRA_META!!!
258 - implement Coro::Select::patch_pp_sselect and it's brother,
259 for hardcode select overriding.
260
2615.151 Mon Jul 6 05:41:57 CEST 2009
262 - backport to windows process emulation code again (patch by
263 Yasuhiro MATSUMOTO).
264 - slightly update Coro::MakeMaker.
265
2665.15 Tue Jun 30 10:28:06 CEST 2009
267 - deprecate Coro::Socket, document how to get ipv6 support via
268 AnyEvent::Socket instead.
269 - implement signal->wait ($cb) interface, similar to semaphores.
270 - work around SvOK not supporting getmagic, so we have to getmagic
271 to test for undef :/ (reported by Matthias Waldorf).
272 - load Coro::AnyEvent in all modules using AnyEvent.
273 - work around perl corrupting our internal data structures,
274 reported by Tokuhiro Matsuno.
275 - enable per-coroutine real and cpu time gathering
276 (Coro::State::enable_times).
277
2785.14 Wed Jun 24 01:37:48 CEST 2009
279 - provide explicit functions to "cede" to the event loop in Coro::AnyEvent,
280 as this seems to have been a difficult concept (poll, sleep, idle,
281 idle_upto).
282 - add Coro::AnyEvent::readable/writable functions.
283 - clarify Coro::EV/Event/AnyEvent manpages.
284 - free per-thread global scalars in the thread calling ->cancel, to
285 avoid crashes when $_, $@ etc., are magical but some of those
286 had already been freed.
287 - "unexperimentalise" the callback interface for Coro::Semaphore.
288 - speed up ready queue management/context switching by using a linked
289 list instead of an array (~5-10%).
290 - implement "watch" command in Coro::Debug shells.
291 - for fun, implement time-slicing as an example in the manpage.
292 - if AnyEvent detects EV or Event, but we don't have Coro::EV or
293 Coro::Event, use the normal AnyEvent handling instead of dieing
294 (the same is true for Coro::Handle).
295 - properly document Coro::EV::timed_io_once.
296 - avoid unneccessary ->cancel calls in Coro::Handle.
297 - maybe make it work on mingw32 with win32 backend
298 (based on patch by Yasuhiro Matsumoto).
299
3005.132 Fri May 29 09:00:39 CEST 2009
301 - do not keep a reference to the argument itself in
302 Coro::Semaphore::guard, as it could change later.
303 - support SO_RCVBUF/SO_SNDBUF nonstandard Coro::Socket options,
304 should support a prepare callback.
305
3065.131 Mon Mar 16 23:20:37 CET 2009
307 - implement and document Coro->suspend, Coro->resume.
308 - fix Coro::Select implementation to not (often) close
309 the passed file descriptors (testcase provided by pippijn).
310
3115.13 Mon Dec 15 21:51:42 CET 2008
312 - EXPERIMENTAL: implement dynamic winds (on_enter/on_leave).
313 - don't set diehook to C<undef> but instead to NULL, to avoid
314 spurious warnings.
315 - fix a lot of bugs in Coro::SemaphoreSet.
316 - Coro::SemaphoreSet will less often create a semaphore needlessly.
317 - add Coro::SemaphoreSet::count and wait methods.
318 - take advantage of the new Guard module.
319 - deprecate Coro::guard.
320 - try to fix the dreaded 01_unblock tests once more. I hate it when
321 testsuites need more fixing than the code they are supposed to test.
322 - croak in more cases when a required callback isn't resolvable.
323 - fix some minor issues in Coro::State->call/eval.
324 - use current coroutine context instead of a temporary one
325 when temporarily switching to another coroutine.
326 - do not call C-level on_destroy handlers during global destruction,
327 to avoid needless segfaults.
328
3295.12 Sun Dec 7 13:30:38 CET 2008
330 - add default config for MirOS, which seems to be a bug-to-bug
331 compatible fork of openbsd ("world domination by releasing
332 openbsd cvs before the openbsd folks do it" or so :).
333 - free_padlist did destroy the names pad, not good, but didn't
334 seem to bother perl - this could fix issues such as eval ""
335 inside a function called from multiple coroutines.
336 - use a different method to detect destruction time.
337 - be more careful when freeing padlists just before global
338 destruction.
339 - fixed and expanded the call/cc example.
340 - renamed _terminate to _coro_run.
341 - new method Coro::Channel->shutdown.
342 - try pthreads on openbsd <4.4 (broken sigaltstack, will
343 pthreads fare better?).
344 - be less picky about destroying "a" running coroutine.
345
3465.11 Tue Nov 25 21:49:05 CET 2008
347 - DEBUGGING in 5.10.0 is a mess: it constantly flags perfectly
348 working code with failed assertions, introducing more bugs than
349 it fixes, requiring elaborate workarounds :(
350
3515.1 Mon Nov 24 08:54:59 CET 2008
352 - wrote a small introductory tutorial - Coro::Intro.
353 - convert Coro::Timer, Coro::Select and Coro::Util to rouse API.
354 - Coro::Select did errornously dup the file descriptors
355 and didn't work with all AnyEvent backends.
356 - Coro::Select wasn't imported correctly form Coro::LWP, causing blocking
357 LWP data transfers.
358 - disassociate c contexts from coro objects - this is agruably more
359 correct, but mostly allows sharing of cctxs between coro and state
360 objects, for added memory savings and speed increases.
361 - bumped $Coro::POOL_RSS up to 32kb by default.
362 - no longer set the optype to OP_CUSTOM, as B::* understandably
363 doesn't like this very much (and we *are* a type of entersub).
364 - implement state cloning, just to prove that call/cc can be done.
365 - automatically load Coro::AnyEvent in Coro::Handle.
366 - wrap ->cancel calls in eval inside Coro::Handle as EV watchers
367 do not have this method (and don't need it either).
368 - speed up generic anyevent methods in Coro::Handle by using rouse
369 callbacks.
370 - allow coroutines in $Coro::IDLE, speeding up Coro::AnyEvent and
371 others. It also makes the debugger happier, as you can trace
372 through the idle threads now.
373 - add comppad_name* and hints ($^H, %^H) to per-thread variables.
374 - eg/event was pretty broken.
375 - better 5.8.6 compatibility.
376
3775.0 Thu Nov 20 10:35:05 CET 2008
13 - NEW ARCHITECTURE: use the latest 4.x version if you experience 378 - NEW ARCHITECTURE: use the latest 4.x version if you experience
14 stability issues. 379 stability issues.
15 - bump API version to 7 - all dependents must be recompiled. 380 - bump API version to 7 - all dependents must be recompiled.
16 - removed timed_* functions - they were not being used anyways 381 - removed timed_* functions - they were not being used anyways
17 and should be replaced by a more generic mechanism - 382 and should be replaced by a more generic mechanism -
18 and were annoying to support anyways :) 383 and were annoying to support anyways :)
19 - removed SemaphoreSet's waiter method - use sem instead. 384 - removed SemaphoreSet's waiter method - use sem method instead.
20 - Coro::Semaphore->adjust didn't correctly wake up enough waiters. 385 - Coro::Semaphore->adjust didn't correctly wake up enough waiters.
21 - async_pool did free a scalar value twice 386 - async_pool did free a scalar value twice
22 ("Attempt to unreference..."). 387 ("Attempt to unreference...").
23 - fix a longstanding bug where calling terminate on a coro that 388 - fix a longstanding bug where calling terminate on a coro that
24 was waiting for a semaphore that was just becoming available 389 was waiting for a semaphore that was just becoming available
26 it was available but waiters were still blocked). 391 it was available but waiters were still blocked).
27 - calling throw on a coroutine that is waiting for a semaphore will 392 - calling throw on a coroutine that is waiting for a semaphore will
28 no longer make it acquire the semaphore (and thus leak a count). 393 no longer make it acquire the semaphore (and thus leak a count).
29 - perl's process emulation is now not even theoretically supported 394 - perl's process emulation is now not even theoretically supported
30 anymore. 395 anymore.
396 - new functions Coro::rouse_cb and Coro::rouse_wait for easier
397 conversion of callback-style to blocking-style.
398 - new methods $coro->schedule_to and ->cede_to, to specifically
399 schedule or cede to a specific coroutine.
31 - new function Coro::Semaphore::wait. 400 - new function Coro::Semaphore::wait.
32 - use named constants in Coro::Channel (Richard Hundt). 401 - use named constants in Coro::Channel (Richard Hundt).
33 - directly patch the entersub opcode calling SLF functions (cede, 402 - directly patch the entersub opcode calling SLF functions (cede,
34 transfer and so on). this does speed up context switching, but 403 transfer and so on). this does speed up context switching, but
35 more importanly, it frees us from the hardcoded behaviour of 404 more importanly, it frees us from the hardcoded behaviour of
52 - implement Coro::Channel in terms of Coro::Semaphore, for a moderate 421 - implement Coro::Channel in terms of Coro::Semaphore, for a moderate
53 (in comparison) 20-40% speedup. 422 (in comparison) 20-40% speedup.
54 - used new SLF interface to reimplement Coro::Signal gaining 423 - used new SLF interface to reimplement Coro::Signal gaining
55 some unknown (because I was too lazy), but certain, speedup, and also 424 some unknown (because I was too lazy), but certain, speedup, and also
56 making signals reliable for the first time. 425 making signals reliable for the first time.
426 - used new SLF interface and other optimisations to speed up async_pool
427 by a factor of two. It also doesn't rely on perl's exception mechanism
428 to exit anymore. The overhead for terminating an async_pool, coro over
429 a normal async is now very small.
430 - sped up coroutine creation/destruction by 40%.
57 - forgot to include Coro/libcoro/README in the dist for all these years. 431 - forgot to include Coro/libcoro/README in the dist for all these years.
58 - work around a freebsd pthreads bug (manual testcancel is required as 432 - work around a freebsd pthreads bug (manual testcancel is required as
59 pthread_cond_wait isn't a cancellation point on freebsd). 433 pthread_cond_wait isn't a cancellation point on freebsd).
434 - use new rouse functions to speed up and simplify Coro::BDB.
435 - make "prefer perl native functions" work with threaded perls.
436 - condense Coro::Debug ps output, hint at v and w flags.
60 - (libcoro) lots of minor cleanups and portability improvements. 437 - (libcoro) lots of minor cleanups and portability improvements.
438
4394.914 Wed Nov 19 12:54:18 CET 2008
440 - fix a disastrous bug in the readline optimisation
441 introduced in 4.801.
61 442
624.913 Sat Nov 15 07:58:28 CET 2008 4434.913 Sat Nov 15 07:58:28 CET 2008
63 - async_pool did free a scalar value twice 444 - async_pool did free a scalar value twice
64 ("Attempt to unreference..."). 445 ("Attempt to unreference...").
65 446

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines