Debian Codegraph @

Changes

raw
1 Revision history for Future
2
3 0.52 2025-07-11
4 [CHANGES]
5 * Expose `Test::Future::Deferred->flush` as a method for test scripts
6 * Include constructed-at message in debug warnings
7
8 0.51 2024-10-21
9 [CHANGES]
10 * Permit convergent futures to not cancel some component futures,
11 simplifying the use of `->without_cancel`
12 * Give a more obvious error message when a `Test::Future::Deferred`
13 runs out of things to do
14 * Various small module style updates to documentation, unit tests,
15 etc
16 * Now requires Perl version 5.14 or later
17
18 0.50 2023-03-17
19 [CHANGES]
20 * Swap all unit tests from `Test::More` to `Test2::V0`
21 * Avoids test_requires on `Test::Refcount` or `Test::Fatal`
22
23 [BUGFIXES]
24 * Fix documentation minisynopsis on `->udata`
25 * Set `@CARP_NOT` so that `AWAIT_GET` rethrow appears to come from
26 the right location (RT145249)
27
28 0.49 2022-10-17
29 [CHANGES]
30 * Big reshuffle to move most code into Future/PP.pm in order to
31 support an optional Future-XS distribution too
32 * Attempt to load Future::XS by preference if it is available
33 * Additional unit tests for cornercases of XS implementation
34 * Remember to provide the AWAIT_WAIT API method
35 * Migrated Future::Queue out into its own distribution
36
37 [BUGFIXES]
38 * Bugfixes and unit tests for convergents on pre-cancelled futures
39 (RT144459)
40
41 0.48 2022-01-26
42 [CHANGES]
43 * Implement the new AWAIT_ON_CANCEL API shape for Future::AsyncAwait
44
45 [BUGFIXES]
46 * Make sure to set rtime for immediate futures (RT134620)
47
48 0.47 2021-01-01
49 [BUGFIXES]
50 * Don't weaken() the waiting future in Future::Mutex as that causes
51 it to be dropped in some situations
52
53 0.46 2020-10-19
54 [CHANGES]
55 * Provide AWAIT_CHAIN_CANCEL named method for compatibility with
56 upcoming Future::AsyncAwait::Awaitable method rename
57
58 [BUGFIXES]
59 * Ensure that Future::Mutex returns proper cloned future instances
60 when waiting (RT133563)
61
62 0.45 2020-04-22
63 [CHANGES]
64 * API changes to make duck-typing closer to Promises/A+ et.al:
65 + Allow sequencing methods to yield non-Future results; upgrade
66 them to being Future-wrapped
67 + Add ->resolve and ->reject as aliases of ->done and ->fail
68 * Recognise PERL_FUTURE_STRICT environment variable to restore
69 previous sequencing method behaviour
70
71 [BUGFIXES]
72 * ->without_cancel still needs to cancel result if caller is
73 cancelled
74 * Ensure all Future::AsyncAwait interop methods properly respect
75 subclassing
76
77 0.44 2020-03-25
78 [CHANGES]
79 * Added ->result; use that in unit tests and docs where appropriate
80 * Slight performance boost in internals by direct field access rather
81 than accessor methods
82 * Document ->await properly; make it wait until ready
83 * Discourage ->block_until_ready
84
85 0.43 2020-01-07
86 [CHANGES]
87 * Implement the Future::AsyncAwait::Awaitable API methods directly
88
89 0.42 2019-11-12
90 [CHANGES]
91 * Added Future::Queue
92
93 [BUGFIXES]
94 * Remove already-completed futures from the on_cancel chain of others
95 to avoid the list growing arbitrarily large in some situations; e.g
96 easily provoked by long loops in Future::AsyncAwait
97
98 0.41 2019-06-13
99 [CHANGES]
100 * Added Future::Exception->throw
101
102 0.40 2019-05-03
103 [CHANGES]
104 * Added Future::Exception (RT129373)
105 * Make ->get throw a Future::Exception and ->fail recognise one
106 * Better documentation of the failure category parameter
107 * Added a properly-documented ->block_until_ready
108
109 0.39 2018-09-20 14:03:05
110 [CHANGES]
111 * Added Test::Future::Deferred
112 * Use Syntax::Keyword::Try in example code
113 * Various docs fixes
114
115 0.38 2017-12-18 01:41:52
116 [CHANGES]
117 * Added counting ability to Future::Mutex (RT123876)
118
119 [BUGFIXES]
120 * Support perl 5.8.1 again (thanks ilmari)
121
122 0.37 2017/11/28 15:39:22
123 [CHANGES]
124 * Finally got around to removing the old Makefile.PL
125
126 [BUGFIXES]
127 * Fix for convergent futures that lose strong references during
128 cancellation (RT120468)
129 * ->without_cancel shouldn't retain the originating future after
130 completion (RT122920)
131
132 0.36 2017/11/27 22:04:52
133 [CHANGES]
134 * Added ->retain method (RT123711)
135 * Fixed some typoes in docs (RT118309)
136 * Added ->state method (RT120759)
137
138 [BUGFIXES]
139 * Ensure that ->without_cancel still strongly holds a reference to
140 its parent future (RT122920)
141
142 0.35 2017/06/23 20:37:57
143 [CHANGES]
144 * Link to YAPC::EU talk video in SEE ALSO
145
146 [BUGFIXES]
147 * Handle cancelled/completed slots when fmap is cancelled (RT120469)
148 (thanks tm604)
149
150 0.34 2016/10/02 18:40:06
151 [CHANGES]
152 * Added Future::Mutex
153 * Minor documentation wording fixes (thanks ilmari)
154
155 [BUGFIXES]
156 * Fallback to 'configure_requires' for older versions of
157 Module::Build that don't support 'test_requires' (RT110721)
158
159 0.33 2015/07/29 16:15:55
160 [CHANGES]
161 * Added ->catch and ->catch_with_f
162 * Add catch-handler semantics to ->then / ->then_with_f
163 * Also pass fmap* items via $_ (RT105558)
164 * Undocument ->done_cb / ->fail_cb / ->cancel_cb
165 * Entirely delete ->and_then / ->or_else
166 * New barename documentation style including "since" versions
167 * Further document the idea of failure categories as used by catch*
168
169 0.32 2015/03/10 19:54:22
170 [CHANGES]
171 * Documentation updates for new ->wrap_cb method
172
173 [BUGFIXES]
174 * Empty convergents should respect subclassing (RT97537)
175 * Adjust loss-report regexp for bleadperl (RT99002 again)
176 * Make trailing periods in warning tests optional, to account for
177 Carp version changes (RT100685)
178
179 0.31 2015/03/08 17:50:06
180 [CHANGES]
181 * Added debugging warning when destroying a failed Future that has
182 not reported its failure (RT102198)
183 * Have ->and_then / ->or_else die immediately to further their
184 deprecation
185 * Announce done_cb/fail_cb/cancel_cb as deprecated in favour of curry
186 * Provide ->wrap_cb method (experimental)
187
188 [BUGFIXES]
189 * Ensure that Test::Future does not retain Futures once they are
190 complete (RT101128)
191 * 'use Future' in Future::Utils (RT102167)
192
193 0.30 2014/11/26 14:29:28
194 [CHANGES]
195 * Rename 'dependent' futures to 'convergent'
196 * Removed examples/ scripts that now exist as independent modules
197 * Added ->without_cancel
198 * Sanity-check the $code argument to ->on_{ready,done,fail,cancel} to
199 ensure it is callable or a Future
200
201 [BUGFIXES]
202 * Ensure that 'ready_at' is always set in DEBUG mode
203 * Fix DEBUG 'lost_at' line number reporting tests for latest
204 bleadperl (RT99002)
205 * Ensure that if Future::Utils::repeat condition code dies, that is
206 passed to the result Future and not propagated to the caller
207 (RT100067)
208 * Failure by returning a non-Future from a sequencing code block
209 should report as a failed Future, not throw exception to caller
210
211 0.29 2014/07/17 12:18:12
212 [CHANGES]
213 * Added Test::Future
214 * Stronger deprecations - repeat {} on failures warns every time,
215 ->and_then / ->or_else warn once
216
217 [BUGFIXES]
218 * Define the behaviour of dependent futures when components are
219 cancelled. (Partially fixes RT96685)
220 * Use Module::Build->prompt (RT96409)
221 * Ensure that repeat on an empty foreach list or empty generator
222 without 'otherwise' behaves correctly, just yield an immediate
223
224 0.28 2014/06/08 22:43:40
225 [CHANGES]
226 * Added ->label
227 * Added ->btime, rtime, elapsed tracing timers
228 * Better handling of 'breaks' version detection
229
230 0.27 2014/06/06 17:42:27
231 [BUGFIXES]
232 * Depend on Carp 1.25 for the new message format with trailing
233 period, so tests work
234
235 0.26 2014/06/01 12:52:53
236 [CHANGES]
237 * Added ->is_failed accessor
238 * Implement ->export_to_level in Future::Utils
239 * Print a warning about lost sequence Futures
240 * Allow Future->done and Future->fail as simple class constructors
241 to return immediates
242 * Added Future->unwrap
243
244 [BUGFIXES]
245 * Ensure that sequence futures are weaken()ed in the forward
246 direction.
247 **NOTE** This will potentially break existing code that depended on
248 strong references. This old code was, however, broken.
249
250 0.25 2014/02/22 03:47:08
251 [BUGFIXES]
252 * Fix warning-matching test in unit test for both older and newer
253 versions of Carp
254
255 0.24 2014/02/21 17:57:49
256 [CHANGES]
257 * Have repeat print a warning if it is asked to retry over a failure
258 * Change documentation to suggest try_repeat instead of repeat for
259 retries over failure
260 * Check at call time that sequencing callbacks really are callable,
261 leading to neater error messages (RT93164)
262
263 0.23 2014/01/19 15:26:55
264 [CHANGES]
265 * Link to Futures advent calendar 2013
266 * Fixes/additions to Phrasebook documentation, including section
267 about tree recursion
268
269 [BUGFIXES]
270 * Ensure that late addition of additional items to a fmap foreach
271 array works correctly even with concurrency
272
273 0.22 2014/01/12 03:12:18
274 [CHANGES]
275 * Ignore ->done or ->fail on cancelled Futures
276 * Added ->then_done, ->then_fail, ->else_done, ->else_fail
277 * Neaten up naming of fmap* family - provide both long and short
278 names for each function
279 * Added Future::Utils::call and call_with_escape
280 * Ensure that dependent futures on subclasses tries to use derived
281 futures as prototype if possible
282
283 0.21 2013/12/29 18:14:41
284 [CHANGES]
285 * Major performance improvement by folding out some layers of sub {}
286 wrapping in sequencing operations
287 * Added ->then_with_f and ->else_with_f
288
289 [BUGFIXES]
290 * Don't start another trial after cancelling a repeat() (RT91147)
291
292 0.20 2013/11/18 19:14:27
293 [CHANGES]
294 * Include an indication of done/failed/cancelled status of a Future
295 when ->done or ->failing an already-ready one
296
297 [BUGFIXES]
298 * Declare requires perl 5.8 because it fails on 5.6 smokers - no idea
299 why
300 * Fix a couple of typoes in docs (RT89185)
301
302 0.19 2013/09/27 13:31:16
303 [BUGFIXES]
304 * Guard against odd things happening during ->cancel at global
305 destruction (RT88967)
306
307 0.18 2013/09/20 19:09:57
308 [CHANGES]
309 * Added 'try_repeat' and 'try_repeat_until_success' aliases
310 * @CARP_NOT trust between Future and Future::Utils
311
312 [BUGFIXES]
313 * Fix to concurrent non-immediate + immediate fmap* return values
314
315 0.17 2013/09/07 16:53:47
316 [CHANGES]
317 * Performance improvement by using direct member access instead of
318 accessor methods
319 * Documentation updates; suggestion of documentation style for
320 Future-returning code
321
322 [BUGFIXES]
323 * Respect subclassing of immediate->followed_by and dependent futures
324 with mixed subclass or immediate components
325
326 0.16 CHANGES:
327 * Proper behaviour of ->wait_all and ->needs_all on an empty list -
328 just return empty immediate done
329 * Proper behaviour of ->wait_any and ->needs_any on an empty list -
330 return an immediate failure
331 * Performance improvement to ->done for immediate Future->new->done
332 * Keep a count of pending child futures to avoid quadratic behaviour
333 due to linear scan of children every time one completes
334 * Improve efficiency of Future::Utils::repeat and fmap* when trials
335 return immediates
336 * Make repeat and fmap* 'return' argument optional by cloning the
337 first non-immediate trial
338 * Rework unit tests to avoid dependency on Test::Warn
339
340 0.15 CHANGES:
341 * Added Future->call constructor
342 * Fixed reference-retaining bug in Future's on_cancel callback list
343 * Ensure that ->cancel returns $self even on immediates
344 * Documentation updates to mention ->wrap and ->call, and the fmap
345 family
346
347 0.14 CHANGES:
348 * Added Future->wrap constructor
349 * Added Future::Utils::fmap* family of functions
350
351 BUGFIXES:
352 * Fixed a precedence bug in 'and' vs &&
353
354 0.13 CHANGES:
355 * Added ->then and ->else methods; like ->and_then but code is passed
356 result directly instead of invocant future
357 * Added repeat { ... } foreach, otherwise argument to set final
358 result and also handle empty lists
359 * Added repeat { ... } generate
360 * Turn repeat { ... } code block exceptions into failed futures
361 * Ensure that ->on_cancel returns $self (RT85134)
362 * Documentation / Phrasebook updates to demonstrate newly added
363 features
364
365 0.12 CHANGES:
366 * Take a 'return' argument to Future::Utils::repeat; deprecate the
367 trial-cloning feature for subclasses
368 * Have ->followed_by/etc... print a warning in void context
369 * Throw an exception when ->followed_by/etc.. code does not yield a
370 Future (RT84188)
371 * Ensure that ->needs_all/->needs_any work correctly on a mix of
372 immediate and pending Futures (RT84187)
373 * Ensure that ->on_done/->on_fail always return invocant (RT84313)
374 * Ensure that ->on_ready($f) works on cancelled Futures (RT84312)
375
376 0.11 CHANGES:
377 * Added Future::Phrasebook documentation file
378 * Ensure that exceptions thrown from ->followed_by code block are
379 caught and turned into failed Futures
380 * Fix filename regexp matches for unit-tests so they work on Windows
381
382 0.10 BUGFIXES:
383 * Account for newer Carp version in unit tests, which appends
384 trailing period to messages
385
386 0.09 CHANGES:
387 * Split ->fail method into new ->die call, only append caller
388 file/line to the exception in the latter
389 * Various documentation and example improvements
390
391 0.08 CHANGES:
392 * Ignore attempts to cancel already-complete or already-cancelled
393 futures, or to attach ->on_cancel callbacks to them
394 * $future->get should return the first result in scalar context
395 * Added Future::Utils with repeat { ...} and
396 repeat_until_success { ... } looping constructs
397
398 * Link to LPW2012 talk slides
399
400 0.07 CHANGES:
401 * Leak debugging
402
403 0.06 CHANGES:
404 * Remembered to actually include the example scripts. No other actual
405 code changes.
406
407 0.05 CHANGES:
408 * Respect subclassing by allowing ->new on instances
409 * Allow subclasses to provide an ->await method which will be used
410 by ->get and ->failure
411 * Added some example scripts to demonstrate how to use Futures with
412 various event systems
413
414 0.04 CHANGES:
415 * Fix implementation of sequenced futures to work properly on
416 immediates
417 * Ensure that future->future chaining via callbacks works correctly
418 on immediates
419 * Link to "curry" in the docs about CODE-returning convenience
420 accessors ->done_cb, ->fail_cb and ->cancel_cb
421
422 0.03 INCOMPATIBLE CHANGES:
423 * Future->needs_all and Future->needs_any now return dependents'
424 results
425
426 CHANGES:
427 * Removed $future->( ... ) callable override
428 * Pass $f1 to ->or_else code block by symmetry with ->and_then
429 * Added $f->followed_by
430 * Added Future->wait_any dependent future constructor
431 * Rearranged documentation and added more examples
432
433 0.02 CHANGES:
434 * Rearranged non-leaf future logic
435 * Added {pending,ready,done,failed,cancelled}_futures accessors
436 * Added Future->needs_any constructor
437
438 0.01 First version, released on an unsuspecting world.
439