1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545
|
Revision history for Future-AsyncAwait
0.70 2024-12-20
[CHANGES]
* Allow `async sub` declarations that put named functions into other
packages
* Update to latest copies of shared t/80*.t cross-module test files
0.69 2024-09-18
[CHANGES]
* Support asynchonous lexical subs declared with `my async sub`
0.68 2024-08-29
[BUGFIXES]
* Updated to latest hax/ support files: #ifdef around SAVEt_LONG for
perl 5.41.3 which removed it
0.67 2024-08-19
[CHANGES]
* Use `File::ShareDir` for storing .h include file, rather than
storing the contents in the `__DATA__` section of the build helper
* Updates for XS::Parse::Sublike v0.23:
+ add .ver hooks struct field
* Pod style updates
[BUGFIXES]
* Permit `async` keyword on bodyless sub or method declarations
(RT151046)
0.66 2023-09-08
[CHANGES]
* Add a unit test to check that `async method` works on core perl
class syntax
* Remember to implement `sub unimport` so that `no Future::AsyncAwait`
works
[BUGFIXES]
* Provide a permit_hintkey to keep XPS happy
0.65 2023-03-17
[CHANGES]
* More specific unit-testing of the croak location when testing
`AWAIT_GET` (related to RT145249)
* Swap all unit tests from `Test::More` to `Test2::V0`
* Avoids test_requires on `Test::Refcount` or `Test::Fatal`
[BUGFIXES]
* A more robust handling of defav during suspend/resume to try not to
upset `perl -d` (RT146246)
0.64 2023-02-14
[CHANGES]
* Define ABI version 2, which adds pre_suspend and post_resume phase
hooks
0.63 2023-02-12
[CHANGES]
* Added various bits of API to extension modules using modhookdata more
flexibly, including by pre-allocation before the first `await`
* Legacy hook API now prints warnings about its deprecation and
impending removal
[BUGFIXES]
* Bleadperl no longer supports `GIMME`, in any case should use
`GIMME_V`
* Fix memory leak around pre-allocated cancel AV
0.62 2022-12-20
[BUGFIXES]
* Save/restore the value of the @_ array; does not work on perls
before 5.24 for reasons unknown (RT130683)
* Updated hax/ files to avoid a build warning on current bleadperl
0.61 2022-11-21
[BUGFIXES]
* Fix for some C compilers which get upset about variable
declarations having goto labels
0.60 2022-11-21
[CHANGES]
* Added entirely new extension API based on structs of hook functions
registered with the module; similar to Object::Pad and XS::Parse::*
* Provide Future::AsyncAwait::ExtensionBuilder in a similar fashion
to above
* Added some more internal assert() and TRACEPRINT calls for
debugging
[BUGFIXES]
* Don't crash if an async sub's returning future is abandoned outside
of an await state
0.59 2022-09-23
[BUGFIXES]
* Fix broken Future->get method resolution on recent
Future + Future::XS experiments
* Fix hax/docatch.c.inc for "NULL OP IN RUN" messages
* Make t/31destroy.t less fragile in the case of non-HASH Future
instances
* Back-compat to perl 5.16 by passing `flags` arg to `cv_copy_flags`
(RT143742)
0.58 2022-04-29
[BUGFIXES]
* Fix memory leak with long-running futures and on_cancel (RT142222)
* Copy SVs with SvPADTMP in case of running code, or folded constants
that erroneously end up with that flag anyway (RT142468)
0.57 2022-03-16
[CHANGES]
* Updates for Devel::MAT::Dumper v0.44
* Updates to bundled hax/ files
0.56 2022-01-26
[CHANGES]
* Updated Awaitable API definition for AWAIT_ON_CANCEL
* Actually use AWAIT_ON_CANCEL properly (RT137723)
* Document the interaction of `multi async sub`
0.55 2021-12-16
[CHANGES]
* Updated for XS::Parse::Keyword 0.15
* Hoist an OP_ARGCHECK to outside the ENTERTRY block if present, so
that signature validation happens synchronously
* Support and unit-test Syntax::Keyword::MultiSub
* No longer set `-std=c89` compile flag now that core perl requires
C99 anyway
0.54 2021-10-26
[CHANGES]
* Add unit-test for await from within perl 5.35.5's multi-variable
`for_list` feature
* Add cross-module test for compatibility with Syntax::Keyword::Match
[BUGFIXES]
* Handle `state` vars correctly (RT139821)
0.53 2021-08-26
[CHANGES]
* Updated for XS::Parse::Keyword 0.13
0.52 2021-07-13
[BUGFIXES]
* Account for changed error message from XS::Parse::Keyword 0.09
(RT137589)
0.51 2021-05-31
[CHANGES]
* Updates for XS::Parse::Keyword 0.05
* Removed unused hax/* files
0.50 2021-04-30
[CHANGES]
* Rewrite of parser logic to use XS::Parse::Keyword instead of
lowlevel code on PL_keyword_parser directly
* Attempt to provide a name for the local'ized GV that cannot be
handled (thanks fgasper)
* Attempt to provide a name for SAVEt_* constants that cannot be
handled
* Added a shouty AWAIT_WAIT method to implement toplevel `await`
(RT134671)
* Docs update - remark that Rust and C++20 have async/await too
(RT135356)
[BUGFIXES]
* Invoke defer {} and finally {} blocks on cancellation (RT135351)
0.49 2021-02-24
[BUGFIXES]
* Handle the CXp_TRY and real try/catch syntax added in perl 5.33.7
(RT134414)
0.48 2021-02-02
[CHANGES]
* Explicitly document that `async sub` works on anon subs too
* Update to latest hax/ files
[BUGFIXES]
* t/80await+try.t requires Syntax::Keyword::Try version >= 0.18
(RT134250)
0.47 2020-11-29
[CHANGES]
* Allow `await` expressions at toplevel of main script, for
consistency of examples, unit tests, etc... (RT129306)
0.46 2020-11-09
[CHANGES]
* Provide future_asyncawait_on_activate() in AsyncAwait.h
* Adjusted docs around new `AWAIT_CHAIN_CANCEL` method
* Depend on Future 0.43 for Awaitable role named methods, rather than
monkey-patching older versions
0.45 2020-10-22
[CHANGES]
* Have Test::Future::AsyncAwait::Awaitable check for the suggested
new `AWAIT_CHAIN_CANCEL` method
[BUGFIXES]
* Avoid refcounting bug when cancelling a suspended SAVEt_SPTR
(RT133564)
* Turn on SvPADMY on precancel AV to keep -DDEBUGGING perl happy
(RT133517)
0.44 2020-10-09
[CHANGES]
* Added initial attempt at `CANCEL` blocks for handling Future
cancellation - experimental
* Announce upcoming API method rename of `AWAIT_ON_CANCEL` to
`AWAIT_CHAIN_CANCEL`
0.43 2020-07-06
[CHANGES]
* Added explicit use VERSION declarations to every perl file
[BUGFIXES]
* Don't segfault when awaiting in closures that capture outer 'our'
variables (RT132945)
0.42 2020-06-29
[BUGFIXES]
* Fixes for assert failures on -DDEBUGGING perls:
+ Workarounds for perl versions prior to 5.22 that get upset about
new*OP() being invoked with OP_CUSTOM
+ Remember to set SVs_PADMY flag on newly-generated pad slot SVs
during suspend
* Don't leak SVs when cleaning up SAVEt_FREESV during cancellation
0.41 2020-06-20
[CHANGES]
* Updates for XS::Parse::Sublike 0.10
[BUGFIXES]
* Fix Build.PL declaration on XS::Parse::Sublike that it needs to be
configure_requires
0.40 2020-04-15
[CHANGES]
* Support a limited form of SAVEt_SPTR when the var is within the
current pad; this supports SAVESPTR(PAD_SVl(padix)) as may be used
by Object::Pad et.al.
0.39 2020-03-27
[CHANGES]
* Updated for XS::Parse::Sublike 0.06 API
0.38 2020-03-24
[CHANGES]
* Use XS::Parse::Sublike for `async sub` parsing. This makes it
possible to coƶperate with other sub-like keyword modules
* Add cross-module test sthat module works correctly with Object::Pad,
and additionally Syntax::Keyword::Dynamically as well
0.37 2020-03-10
[CHANGES]
* Minor reƤrrangement of internal stages to closer match core's
sub parser and allow more generic hooking in future
[BUGFIXES]
* Don't allow a space between attr name and optional parenthesized
argument (RT131571)
0.36 2020-01-16
[CHANGES]
* Add an optional 'force' callback to test_awaitable()
[BUGFIXES]
* Fix more segfault cases during compile failures
(RT129987, RT131487)
0.35 2020-01-07
[CHANGES]
* Support lexical scopes declaring a different class of future
* Document the required API for awaitable objects
* Provide an API conformance test for implementors of alternative
future classes
[BUGFIXES]
* Provide scalar context to controlling expression of `await`
0.34 2019-12-01 01:45:23
[CHANGES]
* Various internal changes to neaten up the hax/ directory of C
source files, letting them be more shareable with other XS dists
[BUGFIXES]
* Fix (some of the cases of) RT129987
* Only fetch CX_CUR() after the future_done_from_stack() call
(RT131118)
0.33 2019-09-08 05:16:05
[BUGFIXES]
* Remember to SPAGAIN after future_done_from_stack() in case the
stack array was moved (RT130464)
0.32 2019-09-03 17:00:35
[CHANGES]
* Define a super-experimental C-level API for other modules to hook
parts of the suspend/resume lifecycle to provide extension
behaviour.
[BUGFIXES]
* Actually use perl's own `wrap_keyword_plugin()`
* Avoid compiler warning about int/IV mismatch in printf (RT130285)
* Use warn_sv() to avoid compiler wraning about formatless warn() on
a plain PV (RT130285)
* Don't segfault on parse errors from parse_block() (RT130417)
0.31 2019-07-25 15:09:04
[CHANGES]
* Use `parse_subsignature()` on bleadperl and backport it to
perl 5.26, allowing parsing of subroutine signatures (RT123465)
0.30 2019-07-05 16:09:02
[CHANGES]
* Parse attribute lists on `async sub`s (RT129985)
0.29 2019-06-26 20:23:12
[CHANGES]
* Further annotations in Devel::MAT::Dumper helper about loop state
[BUGFIXES]
* Fix various memory leaks of abandoned `async sub`s (RT129836)
0.28 2019-06-17 17:06:18
[BUGFIXES]
* Fix localisation of hints hash at compiletime so nested `async sub`
works correctly (RT129836)
0.27 2019-06-04 20:48:42
[CHANGES]
* Detect certain forbidden constructs at compile-time; await inside:
+ non-lexical foreach
+ map and grep (RT129748)
+ string-eval (RT126036)
[BUGFIXES]
* Preserve regexp context across await boundary (RT129321)
0.26 2019-04-27 12:41:11
[BUGFIXES]
* Further fixes for foreach(LIST) handling (RT129319)
* Handle SAVEt_FREEPV (RT129320)
* Cleanup itervar and SAVEt_PADSV_AND_MORTALIZE of abandoned futures
(RT129320)
* Ensure body of async sub starts with OP_NEXSTATE so as not to upset
Devel::Cover (thanks ilmari) (RT128309)
0.25 2019-04-24 15:46:15
[BUGFIXES]
* Print a warning but don't panic on resume with lost returning
future (RT129303)
0.24 2019-04-18 23:47:56
[CHANGES]
* Stop `async sub`s on ->cancel (RT129202)
* Propagate ->cancel requests back to awaiting future, though at
present only on perl 5.24+ (RT129202)
* Added more internal consistency checks and `panic()` assertions
[BUGFIXES]
* Further fixes for broken behaviour of `foreach(LIST)` (RT129215)
* Fix Devel::MAT::Dumper helper for expired but unreclaimed magic
0.23 2019-04-16 01:08:34
[BUGFIXES]
* Many improvements to mortals handling, including workarounds for
lack of cx->old_tmpsfloor on perls before 5.24 (RT128619)
0.22 2019-04-02 00:12:47
[CHANGES]
* More detailed annotations in Devel::MAT::Dumper helper
[BUGFIXES]
* Partial attempt at freeing things when dropping a pending await
future (RT128620)
* Fix for labeled loop controls (RT128205)
0.21 2019-02-02 17:19:35
[BUGFIXES]
* Fix more memory leaks - simple test case now executes cleanly
(RT128222)
0.20 2019-01-16 22:34:20
[BUGFIXES]
* Ensure mortal SVs aren't reclaimed prematurely during
suspend/resume
* Fix several memory leaks. Some still remain but overall the
situation is much improved (RT128222)
0.19 2019-01-08 23:49:03
[BUGFIXES]
* Replace stolen array or hash pad lexicals with newAV() / newHV() to
maintain the expected SvTYPE() invariants (RT128176)
0.18 2019-01-05 20:08:38
[CHANGES]
* Declare threaded perls before version 5.22 as unsupported. The bug
remains open but for now I'm disinclined to look into it. (RT124351)
[BUGFIXES]
* Don't panic about blk_eval.old_eval_root or .cur_text fields, as it
seems we can safely ignore those (RT126036)
0.17 2019-01-04 18:45:22
[BUGFIXES]
* Perl 5.26 and above still needs SvREFCNT_inc() on the state array
in CXt_LOOP_ARR (RT124353)
* Better fix for scopestack name tracking under -DDEBUGGING
(RT128164)
* Set -DNO_XSLOCKS in order to get working JMPENV on MSWin32
(RT128163)
0.16 2019-01-03 22:09:28
[CHANGES]
* Use ENTER_with_name/LEAVE_with_name variants for easier debug (thanks
ilmari)
* Don't clone the CVf_CVGV_RC flag
* Unit-test that async/await also behaves fine through nested named
method calls
* Unit-test die after single await()
[BUGFIXES]
* Avoid call to non-public unshare_hek() function (RT125613)
* Remember to wrap pp_await in docatch() if CATCH_GET is true. Fixes
many failing test cases (double-nested await, RT126037, RT123062)
0.15 2018-01-24 04:12:04
[CHANGES]
* Support older perls back to 5.16 (continues work on RT122252). Just
5.14 remains unsupported now
* Neater implementation which avoids hacky workarounds from abusing
`cv_clone()`
[BUGFIXES]
* Avoid using anonymous union in struct SuspendedFrame (thanks ilmari)
(RT124171)
0.14 2018-01-22 04:42:02
[CHANGES]
* Document and test that 'await' works from inside 'do {}'
* Test that two nested 'async sub's can await nicely
[BUGFIXES]
* Fix for 'await' twice inside the same 'foreach' loop (RT124144)
* Fix handling of ITERVAR save/restore on perl 5.24+
* Use correct printf format for IVs when debug printing
* Ensure that captured lexicals from now-dead scopes remain working
0.13 2018-01-18 15:52:03
[CHANGES]
* Support older perls back to 5.18 (continues work on RT122252)
[BUGFIXES]
* Ensure that 'async sub' called in list context doesn't leak its
input arguments as well as Future result
0.12 2018-01-15 19:02:42
[CHANGES]
* Support older perls back as far as 5.20 and 5.22
(partly solves RT122252)
* Link to TPCiA talk recording on youtube
0.11 2018-01-07 16:35:25
[BUGFIXES]
* Fixes for markstack restoration calculation
* Don't save/restore PAD slots relating to outer captures or
protosubs (RT124026)
0.10 2017-08-13 23:25:33
[BUGFIXES]
* Implement enough of SAVEt_DESTRUCTOR_X to make try/finally work
* Fix the remaining integration tests with Syntax::Keyword::Try now
latest version (0.07) works correctly
0.09 2017-08-13 17:44:48
[CHANGES]
* Link to TPCiA talk slides
* Forbid the use of foreach loops on non-lexicals as that has
semantic problems due to the implied 'local'
* Unit-test that plain 'eval{}' works as expected
* Allow specifically the use of 'local $@' to support common patterns
around 'eval{}'
* Unit-test that try/catch from Syntax::Keyword::Try works
[BUGFIXES]
* Save cx->blk_gimme on CXt_LOOP_* contexts (thanks rurban)
(RT122673)
0.08 2017/08/10 16:48:52
[CHANGES]
* Handle the other CXt_LOOP_* context types, making foreach() loops
work
0.07 2017/07/11 23:26:48
[CHANGES]
* Forbid the use of 'await' outside of 'async sub'
* Handle CXt_BLOCK contexts
* Handle SAVEt_CLEARSV and SAVEt_CLEARPADRANGE savestack entries
* Further documentation rework
[BUGFIXES]
* Fix off-by-one error on reading the savestack, resulting in a
number of false-"TODO" failures being fixed
* Fix parser logic for parenthesized 'await( ... )' expressions
0.06 2017/06/29 17:43:19
[CHANGES]
* Support suspend/resume within while loops and plain loop blocks
* Import the syntax keywords by default, rather than having to
request them as an import symbol
* Added some initial documentation to explain the new syntax
[BUGFIXES]
* Declare (for now) dependency on perl 5.24 to prevent older versions
from attempting it and failing. We hope to support older versions
back to 5.14 in due course.
0.05 2017/06/27 15:20:54
[BUGFIXES]
* Fix await op so it can await multiple times within the same sub
0.04 2017/06/06 18:42:15
[CHANGES]
* Suspend and resume the PAD around an await so lexical variables are
preserved
* Ensure that anon async subs can suspend/resume - see also
https://rt.perl.org/Public/Bug/Display.html?id=131519
[BUGFIXES]
* Ensure MARK stack doesn't upset debugperl
0.03 2017/05/08 21:33:46
[CHANGES]
* Handle the value and mark stacks around suspend/await, allowing
some stack temporaries to be preserved
* Avoid naming internal functions "Perl_..."
[BUGFIXES]
* Ensure that die after await is still caught
* Avoid C++-style comments and C99-style for() loop variable declarations
(RT121569)
0.02 2017/05/08 16:55:38
[CHANGES]
* Initial tiny implementation of actual suspend/resume on 'await'
|