Branch: Tag:

2023-09-19

2023-09-19 12:32:42 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Concurrent.Promise: {success,failure}_cbs need to always contain arrays.

query_{success,failure}_callbacks() do not like when they contain zeroes.

Fixes [WS-670].

Already fixed in Pike master (a3dfc367775d52d9907e8d7f5f6a142cd36c57c1).

2022-11-20

2022-11-20 12:43:50 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Work in progress: Sakura master

2022-06-14

2022-06-14 09:28:39 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Concurrent: Adjust lots of function prototypes.

2022-06-02

2022-06-02 14:27:38 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Concurrent: Stricter handling of zero.

2022-06-01

2022-06-01 08:54:34 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Concurrent.Promise: Disable debug output.

2022-05-31

2022-05-31 10:45:59 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Concurrent: Fix types for callback functions.

2022-05-06

2022-05-06 14:17:13 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Concurrent.AggregatedPromise: Fix type for aggregate_cb().

aggregate_cb() is called from start() with UNDEFINED as
the third argument.

2021-12-06

2021-12-06 10:57:04 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Concurrent: Fix syntax to be compatible with Pike 8.0.886 and earlier.

Modules in Pike 8.0 need to be syntax-compatible with all released
versions of Pike 8.0 (or at least Pike 8.0.232 and later).

2021-09-11

2021-09-11 20:59:13 by Arne Goedeke <el@laramies.com>

Concurrent: Handle possible backend change in timeout()

Concurrent.Future()->timeout() could fail to remove the call_out if
the backend of the corresponding Promise is changed after calling
timeout().

2021-09-11 20:59:09 by Tobias S. Josefowitz <tobij@tobij.de>

Concurrent: Fix Future()->timeout()

call_callback() may use call_out(cb, 0, ...) to call a callback. This
means that if we call multiple callbacks wie call_callback(), they mæy
be executed in arbitrary order. The implementation of
Future()->timeout() was subject to races in this regard, leading to the
Future returned by ->timeout() to resolve with 0 instead of the result
or instead of rejecting with the same reason as the original
Promise/Future was rejected before the timeout triggered.

Using less abstractions, we save on such races, Future objects, and even
lambdas while getting arguably eaiser to read code.

2021-09-11 20:58:33 by Arne Goedeke <el@laramies.com>

Concurrent: Handle possible backend change in timeout()

Concurrent.Future()->timeout() could fail to remove the call_out if
the backend of the corresponding Promise is changed after calling
timeout().

2021-09-11 20:58:33 by Tobias S. Josefowitz <tobij@tobij.de>

Concurrent: Fix Future()->timeout()

call_callback() may use call_out(cb, 0, ...) to call a callback. This
means that if we call multiple callbacks wie call_callback(), they mæy
be executed in arbitrary order. The implementation of
Future()->timeout() was subject to races in this regard, leading to the
Future returned by ->timeout() to resolve with 0 instead of the result
or instead of rejecting with the same reason as the original
Promise/Future was rejected before the timeout triggered.

Using less abstractions, we save on such races, Future objects, and even
lambdas while getting arguably eaiser to read code.

2021-05-08

2021-05-08 16:23:35 by Martin Nilsson <nilsson@fastmail.com>

Improved documentation.

2020-12-04

2020-12-04 15:54:49 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Concurrent.Promise: Disable debug output.

2020-11-01

2020-11-01 18:55:50 by Tobias S. Josefowitz <tobij@tobij.de>

Concurrent: Explicit error on executor rejection failure

This is not perfect (as we currently have no way of properly chaining
errors), but this should provide more helpful error messages to
developers who somehow manage to throw in the executor after finalising
the promise some other way.

2020-11-01 18:55:50 by Tobias S. Josefowitz <tobij@tobij.de>

Concurrent: Catch executor throwing and convert to rejection

There is arguably little reason to use the executor 'API' if not for it
doing this.

2020-10-28

2020-10-28 10:46:53 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Concurrent.Promise: Fix recursive mutex lock errors.

Do not call callbacks while holding the mutex lock.

Fixes multiple testsuite failures.

2020-10-28 10:46:31 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Concurrent.Promise: Fix recursive mutex lock errors.

Do not call callbacks while holding the mutex lock.

Fixes multiple testsuite failures.

2020-10-26

2020-10-26 11:08:18 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Concurrent.Promise: Fixed race-condition in finalise().

The API for finalise() raced with on_{success,failure}(), as
new callbacks could get registered after finalise() was called,
but before the state was updated.

Fixes #10055.

2020-10-26 10:59:59 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Concurrent.Promise: Fixed race-condition in finalise().

The API for finalise() raced with on_{success,failure}(), as
new callbacks could get registered after finalise() was called,
but before the state was updated.

Fixes #10055.

2020-10-25

2020-10-25 20:58:31 by Tobias S. Josefowitz <tobij@tobij.de>

Concurrent: Explicit error on executor rejection failure

This is not perfect (as we currently have no way of properly chaining
errors), but this should provide more helpful error messages to
developers who somehow manage to throw in the executor after finalising
the promise some other way.

2020-10-20

2020-10-20 18:57:33 by Tobias S. Josefowitz <tobij@tobij.de>

Concurrent: Catch executor throwing and convert to rejection

There is arguably little reason to use the executor 'API' if not for it
doing this.

2020-10-10

2020-10-10 18:03:55 by H William Welliver <william@welliver.org>

Concurrent: minor autodoc fix

2020-10-09

2020-10-09 09:30:13 by Chris Angelico <rosuav@gmail.com>

Concurrent: Silence console messages unless debugging

2020-09-08

2020-09-08 20:50:39 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Concurrent: Move handling of aggregated promises to AggregatePromise.

This simplifies the code for promises that do not use aggregation,
and avoids bugs when aggregation functions are used in combination
with non-aggregation functions.

2020-08-28

2020-08-28 08:59:09 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Concurrent.AggregateState: Added CAVEAT LECTOR.

2020-08-28 08:58:46 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Concurrent.Promise: Improved behavior for CONCURRENT_DEBUG.

Don't store raw backtraces, they may contain references to stuff
that the user doesn't expect to get extra references.

2020-08-28 08:56:39 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Concurrent.Future: Added try_get().

2020-08-28 08:56:28 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Concurrent.Future: Added query_{success,failure}_callbacks().

2020-08-28 08:54:56 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Concurrent.AggregateState: Protect create().

2020-08-26

2020-08-26 15:44:39 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Concurrent.Promise: Refactored the dependency handling.

Get rid of multiple cases of circular referencing via AggregateState.

Removes the AggregateState class.

The folding function no longer gets called with failure values.

The successful array result no longer contains failed values.

References between Promises and Futures should now strictly be only
in the result notification direction.

API-compatible, user level code should not notice any differences.

2020-08-25

2020-08-25 12:37:25 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Concurrent.AggregateState: Added CAVEAT LECTOR.

2020-08-06

2020-08-06 11:08:26 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Concurrent.Promise: Improved behavior for CONCURRENT_DEBUG.

Don't store raw backtraces, they may contain references to stuff
that the user doesn't expect to get extra references.

2020-05-16

2020-05-16 17:26:18 by Stephen R. van den Berg <srb@cuci.nl>

Concurrent: Add CONCURRENT_DEBUG to get more meaningful broken-promises.

2020-05-16 17:23:51 by Stephen R. van den Berg <srb@cuci.nl>

Concurrent: Add CONCURRENT_DEBUG to get more meaningful broken-promises.

2019-09-08

2019-09-08 11:25:23 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Concurrent.Future: Added try_get().

2019-05-23

2019-05-23 14:36:08 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Concurrent.Future: Added query_{success,failure}_callbacks().

2019-05-04

2019-05-04 09:12:19 by Arne Goedeke <el@laramies.com>

Merge remote-tracking branch 'origin/master' into new_utf8

2019-05-03

2019-05-03 12:36:51 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Concurrent: Fixed syntax error in recent backport.

2019-04-30

2019-04-30 23:34:34 by Stephen R. van den Berg <srb@cuci.nl>

Concurrent.Promise: Introduce delay() and optimise timeout().

2019-04-29

2019-04-29 21:55:41 by Stephen R. van den Berg <srb@cuci.nl>

Concurrent.Promis: Fix/optimise delay() and timeout().

2019-04-26

2019-04-26 15:22:37 by Stephen R. van den Berg <srb@cuci.nl>

Concurrent.Promise: Add delay() member to delay the future.

2019-04-20

2019-04-20 11:02:17 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Concurrent.AggregateState: Protect create().

2019-04-15

2019-04-15 09:56:50 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Concurrent: Default global_on_failure() to master()->handle_error().

This reduces risk of lost error messages from Concurrent.Promise el al.

2019-04-15 09:56:45 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Concurrent.Pomise: Improved diagnostics for broken promises.

The Promise has typically already been destructed when the backtrace
is described, so ensure that it at least is present in the message.

Fixes PIKE-181 (#8181).

2019-04-15 09:56:19 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Concurrent: Default global_on_failure() to master()->handle_error().

This reduces risk of lost error messages from Concurrent.Promise el al.

2019-04-15 09:56:19 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Concurrent.Pomise: Improved diagnostics for broken promises.

The Promise has typically already been destructed when the backtrace
is described, so ensure that it at least is present in the message.

Fixes PIKE-181 (#8181).

2019-04-10

2019-04-10 09:47:06 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Concurrent.Future: Events may still occur after the timeout.

Fixes spurious complaint "Promise has already been finalised."
when a promise with a timeout is fullfilled after the timeout
has triggered.

Fixes PIKE-177 (#8177).

2019-04-10 09:44:12 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Concurrent.Future: Events may still occur after the timeout.

Fixes spurious complaint "Promise has already been finalised."
when a promise with a timeout is fullfilled after the timeout
has triggered.

Fixes PIKE-177 (#8177).

2019-03-01

2019-03-01 14:19:53 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Concurrent: Moved some initialization code to __INIT().

This fixes an issue with the variable callout not being initialized
properly in classes that have inherited Concurrent.

Fixes some of the issues in [WS-404].

2019-03-01 14:16:12 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Concurrent: Moved some initialization code to __INIT().

This fixes an issue with the variable callout not being initialized
properly in classes that have inherited Concurrent.

Fixes some of the issues in [WS-404].

2019-02-28

2019-02-28 15:04:06 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Concurrent.Future: Added wait().

This differs from get() in that it will not throw on failure.

2019-02-28 15:02:12 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Concurrent.Future: Added wait().

This differs from get() in that it will not throw on failure.

2019-02-27

2019-02-27 15:54:40 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Concurrent.Promise: Fix handling of rejections.

The global rejection callback (installed via Concurrent.on_failure())
must not be called before the user has had a chance to register
custom rejection callbacks (via Concurrent.Future()->on_failure()).

Calling of the global rejection callback is now deferred until
the Promise is destructed.

Fixes erroneous reporting of unhandled Promise errors.

2019-02-27 15:53:52 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Concurrent.Promise: Reduce number of complaints.

Don't complain about dropping promises that have no corresponding
future on the floor. As the promises have no future, nobody is
affected by them not being fulfilled.

2019-02-27 15:46:58 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Concurrent.Promise: Fix handling of rejections.

The global rejection callback (installed via Concurrent.on_failure())
must not be called before the user has had a chance to register
custom rejection callbacks (via Concurrent.Future()->on_failure()).

Calling of the global rejection callback is now deferred until
the Promise is destructed.

Fixes erroneous reporting of unhandled Promise errors.

2019-02-18

2019-02-18 13:28:40 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Documentation [Concurrent]: Note where backend state isn't propagated.

2019-02-18 13:28:37 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Concurrent.Future: Added promise_factory().

This makes propagating state to new Promises easier.

New Promises are now created with the same backend as
the Promise they originated from.

2019-02-18 10:38:38 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Documentation [Concurrent]: Note where backend state isn't propagated.

2019-02-18 10:35:45 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Concurrent.Future: Added promise_factory().

This makes propagating state to new Promises easier.

New Promises are now created with the same backend as
the Promise they originated from.

2019-02-15

2019-02-15 14:07:39 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Documentation [Concurrent]: Added note about backend disabled mode.

2019-02-15 14:07:26 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Concurrent.Future: Reduce references.

There's no point in having the timeout call_out after
the Promise has been fulfilled, so remove it (if any).

2019-02-15 14:07:21 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Concurrent.Future: Added {get,set}_backend().

This makes it possible to have a custom Pike.Backend handle
the callbacks for the Future.

2019-02-15 14:07:14 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Concurrent.Future: Added internal function call_callback().

This makes it possible to adjust the way that callbacks are
called via overloading. The typical use case is for wanting
callbacks to be called by some other thread than the backend.

2019-02-13

2019-02-13 10:07:32 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Documentation [Concurrent]: Added note about backend disabled mode.

2019-02-13 10:05:43 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Concurrent.Future: Reduce references.

There's no point in having the timeout call_out after
the Promise has been fulfilled, so remove it (if any).

2019-02-13 09:58:51 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Concurrent.Future: Added {get,set}_backend().

This makes it possible to have a custom Pike.Backend handle
the callbacks for the Future.

2019-02-13 09:52:09 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Concurrent.Future: Added internal function call_callback().

This makes it possible to adjust the way that callbacks are
called via overloading. The typical use case is for wanting
callbacks to be called by some other thread than the backend.

2019-02-06

2019-02-06 22:17:42 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Concurrent.Promise: Reduce number of complaints.

Don't complain about dropping promises that have no corresponding
future on the floor. As the promises have no future, nobody is
affected by them not being fulfilled.

2018-12-14

2018-12-14 10:19:17 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Concurrent.Promise: Reduce number of complaints.

Don't complain about dropping promises that have no corresponding
future on the floor. As the promises have no future, nobody is
affected by them not being fulfilled.

2018-11-04

2018-11-04 16:11:11 by Arne Goedeke <el@laramies.com>

Merge remote-tracking branch 'origin/master' into new_utf8

2018-11-03

2018-11-03 14:21:37 by Marcus Comstedt <marcus@mc.pp.se>

Merge remote-tracking branch 'origin/8.1' into gobject-introspection

2018-05-18

2018-05-18 21:58:01 by Martin Nilsson <nilsson@fastmail.com>

Hide AggregateState

2018-04-09

2018-04-09 21:54:02 by Martin Karlgren <marty@roxen.com>

Concurrent.results: Handle an empty argument array properly.

Previously code such as:

Concurrent.Future f2 = Concurrent.results(({}));

f2->on_success(lambda(array(string) a) { werror("success: %O.\n", a); })
->on_failure(lambda(mixed err) { werror (describe_backtrace(err)); });

... would lead to a backtrace because the future was destructed prematurely.

2018-04-09 21:53:30 by Martin Karlgren <marty@roxen.com>

Concurrent.results: Handle an empty argument array properly.

Previously code such as:

Concurrent.Future f2 = Concurrent.results(({}));

f2->on_success(lambda(array(string) a) { werror("success: %O.\n", a); })
->on_failure(lambda(mixed err) { werror (describe_backtrace(err)); });

... would lead to a backtrace because the future was destructed prematurely.

2018-02-01

2018-02-01 19:21:20 by Stephen R. van den Berg <srb@cuci.nl>

Concurrent: Various improvements, bugfixes, backported from 8.1.

Add map_with() as an alias for flat_map().
Reduce lock contention and cleanup superfluous catches.
Clarify docs.
Free callbacks after use, frees memory and references.
Add convenience variant to zip() and extend testsuite.
Transparent automatic backend enable/disable.

2017-12-31

2017-12-31 23:19:10 by Peter Bortas <bortas@gmail.com>

Merge remote-tracking branch 'origin/8.1' into peter/travis

2017-12-06

2017-12-06 21:11:26 by Stephen R. van den Berg <srb@cuci.nl>

Concurrent: Transparent automatic backend enable/disable.

2017-12-04

2017-12-04 19:20:58 by Stephen R. van den Berg <srb@cuci.nl>

Concurrent: Reduce stackdepth, minimise catch() breadth.

2017-12-04 15:31:35 by Stephen R. van den Berg <srb@cuci.nl>

Concurrent: Slight optimisation and typo fix.

2017-12-04 15:22:32 by Stephen R. van den Berg <srb@cuci.nl>

Promise: Update docs again.

2017-12-04 15:04:19 by Stephen R. van den Berg <srb@cuci.nl>

Concurrent: Improve more docs.

2017-12-04 14:52:35 by Stephen R. van den Berg <srb@cuci.nl>

Concurrent: Improve docs.

2017-12-04 14:13:30 by Stephen R. van den Berg <srb@cuci.nl>

Concurrent: Add convenience variant to zip() and extend testsuite.

2017-12-01

2017-12-01 00:48:06 by Stephen R. van den Berg <srb@cuci.nl>

Concurrent: Free callbacks after use, frees memory and references.

2017-11-30

2017-11-30 14:51:23 by Stephen R. van den Berg <srb@cuci.nl>

Concurrent: So much for tail call optimisation; exception isolation ruined it.

2017-11-30 14:32:51 by Stephen R. van den Berg <srb@cuci.nl>

Concurrent: Facilitate tail call optimisation.

2017-11-28

2017-11-28 12:56:51 by Stephen R. van den Berg <srb@cuci.nl>

Concurrent: Clarify docs.

2017-11-28 12:11:46 by Stephen R. van den Berg <srb@cuci.nl>

Concurrent: Reduce lock contention and cleanup superfluous catches.

The interpreter lock will protect trivial cases.
The natural destruction at the end of a block takes care of some
unlocks.

2017-11-28 01:27:33 by Stephen R. van den Berg <srb@cuci.nl>

Concurrent: Add use_backend() to allow promises without a running backend.

2017-11-27

2017-11-27 17:44:49 by Martin Nilsson <nilsson@fastmail.com>

Revert obfuscating ?: uses.

2017-11-27 17:39:21 by Martin Nilsson <nilsson@fastmail.com>

Normalize style.

2017-11-27 17:14:56 by Martin Nilsson <nilsson@fastmail.com>

Simplified fold_one() slightly. Interpretor lock ensures promise is either set or not.

2017-11-27 14:57:37 by Stephen R. van den Berg <srb@cuci.nl>

Concurrent.Promise: Reduce mutex contention, memory usage, simplify code, fix a few races.

2017-11-27 14:57:37 by Stephen R. van den Berg <srb@cuci.nl>

Concurrent: Cleanup.

2017-11-27 12:37:43 by Stephen R. van den Berg <srb@cuci.nl>

Concurrent.Promise: Harmonise method names (failed -> failures).

2017-11-27 12:29:04 by Stephen R. van den Berg <srb@cuci.nl>

Concurrent.Promise: Improve docs.

2017-11-27 12:02:16 by Stephen R. van den Berg <srb@cuci.nl>

Concurrent.Promise: Small cleanups(2).

2017-11-27 11:58:04 by Stephen R. van den Berg <srb@cuci.nl>

Concurrent.Promise: Small cleanups.

2017-11-27 11:42:48 by Stephen R. van den Berg <srb@cuci.nl>

Concurrent.Promise: depend() fixes.

Rename apply_fold() to fold().
Add first_completed().
Add min_failed(), max_failed(), any_results().

2017-11-26

2017-11-26 20:22:07 by Stephen R. van den Berg <srb@cuci.nl>

Concurrent: Add map_with() as an alias for flat_map().

2017-11-24

2017-11-24 22:15:14 by Stephen R. van den Berg <srb@cuci.nl>

Concurrent: Improve docs.

2017-11-24 22:13:11 by Stephen R. van den Berg <srb@cuci.nl>

Concurrent: Improve docs.

2017-11-24 20:54:29 by Stephen R. van den Berg <srb@cuci.nl>

Concurrent: Improve docs.

2017-11-24 20:53:28 by Stephen R. van den Berg <srb@cuci.nl>

Concurrent: Improve docs.

2017-11-24 09:21:17 by Stephen R. van den Berg <srb@cuci.nl>

Concurrent.Future: depend(),fold() and apply_fold(); interfacechange.

2017-11-23

2017-11-23 09:19:16 by Stephen R. van den Berg <srb@cuci.nl>

Promise: Rename fold_finish() to apply_fold().

2017-11-23 01:31:17 by Stephen R. van den Berg <srb@cuci.nl>

Promise: Fix docs.

2017-11-22

2017-11-22 22:43:39 by Stephen R. van den Berg <srb@cuci.nl>

Promise: Add depend(), fold() and fold_finish() methods.

2017-11-05

2017-11-05 15:53:18 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Merge branch 'grubba/rename_lfun_destroy' into 8.1

* grubba/rename_lfun_destroy:
Modules: Fixed logts of warnings.
Testsuite: Updated for LFUN::_destruct().
Compiler: Don't complain about LFUN::destroy() in compat mode.
Fix multiple warnings.
Runtime: LFUN::destroy() has been renamed to _destruct().
Compiler: Rename LFUN::destroy() to LFUN::_destruct().

2017-11-05 15:49:10 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Modules: Fixed logts of warnings.

More fall out from the LFUN::destroy ==> LFUN::_destruct rename.

2017-06-18

2017-06-18 17:11:37 by Martin Nilsson <nilsson@fastmail.com>

Added Concurrent, and moved changes not in the next release to next beta.

2017-06-08

2017-06-08 16:18:11 by Martin Nilsson <nilsson@fastmail.com>

Added _sprintf

2017-02-24

2017-02-24 23:24:23 by Martin Nilsson <nilsson@fastmail.com>

Somewhat stricter type on global on_failure.

2017-02-24 12:14:42 by Martin Nilsson <nilsson@fastmail.com>

Added a global on_failure to capture errors not handled in individual promises.

2016-12-03

2016-12-03 19:03:29 by Stephen R. van den Berg <srb@cuci.nl>

Concurrent: Support creating promises from traditional methods with callbacks.

2016-12-01

2016-12-01 22:22:09 by Stephen R. van den Berg <srb@cuci.nl>

Concurrent: then() and thencatch() support smart mapping, improve docs.

2016-11-18

2016-11-18 15:00:44 by Stephen R. van den Berg <srb@cuci.nl>

Concurrent: JavaScript API fixes, convenience APIs added.

2016-11-18 13:12:22 by Stephen R. van den Berg <srb@cuci.nl>

Concurrent: Doc fixes and simplify code.

2016-11-09

2016-11-09 14:52:06 by Stephen R. van den Berg <srb@cuci.nl>

Concurrent: Implement then() and other JavaScript APIs.

2016-11-05

2016-11-05 15:37:01 by Martin Nilsson <nilsson@fastmail.com>

Added #pike

2016-10-26

2016-10-26 12:56:19 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Concurrent: Improved thread safety for Results and Fold.

2016-10-26 12:45:26 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Concurrent.Promise: Changed API somewhat.

success() and failure() now throw errors if the Future isn't
in the STATE_PENDING state.

Add try_success() that is a noop if the Future isn't pending.

Renamed maybe_failure() to try_failure() for symmetry with try_success().

Clean up FirstCompleted by using try_success() and try_failure().

2016-10-26 10:21:59 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Concurrent.Future: Support multiple concurrent callbacks.

Multiple success and failure callbacks may now be registered
concurrently. This is needed to avoid surprises when implicit
callbacks are installed by eg flat_map().

Also some related documentation updates.

Fixes [bug 7816 (#7816)].

2016-10-26 09:56:27 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Concurrent.Promise: Fixed bug in maybe_failure().

maybe_failure() should now work as documented.

2016-06-15

2016-06-15 14:11:12 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Concurrent.Promise: Fixed potential backtrace in destroy().

destroy() now uses unlocked_failure() to avoid potential recursive
mutex locks.

Also converted some comments to AutoDoc.

2016-06-02

2016-06-02 15:33:45 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Concurrent.Future: Added timeout().

2016-06-01

2016-06-01 13:51:09 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Concurrent.Promise: Added maybe_failure().

2016-05-31

2016-05-31 16:06:52 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Concurrent.Promise: Added unlocked variants of success() and failure().

2016-05-18

2016-05-18 15:51:22 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Documentation [Concurrent]: Fixed a few typos.

2016-05-09

2016-05-09 22:21:49 by Pontus Östlund <poppanator@gmail.com>

Protocols.HTTP.Query: Fixed an old bug (https://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=7676) where basically the timeout in timed_async_fetch wasn't reset each new data read.
This timeout had it's own property (data_timeout) which now is "deprecated" since the property "timeout" pretty much serves the same purpose, but on connection. So now timeout is the default value to use unless data_timeout is explicitly set, in which case that value will be used.
Since there was no proper way to set a max time for the entire operation (well, that was by accident and not intention how the data_timeout in timed_async_fetch worked) the new property "maxtime" has been added. If this is set (default is 0=indefinetly) the request will be aborted after maxtime second even if data is still being read.

So in short:

data_timeout = 0 // unless explicitly set
timeout = 120 // connection timeout, and then data read timeout
maxtime = 0 // 0 = off, otherwise the entire operation must be done within maxtime seconds or else the request is aborted

Protocols.HTTP.Session: Added some documentation

Protocols.HTTP.Promise: New module which utilise the new Concurrent.Promise/Future stuff for HTTP requests. Internally uses Protcols.HTTP.Session for the actual HTTP stuff.

Web.Api.Api: Now fetches data asynchronously when async calls are made.

Concurrent: on_success and on_fail now returns the object being called so that they can be chained.

Parser.Markdown: Fixed the #require macro directive.

2016-05-05

2016-05-05 06:14:37 by Pontus Östlund <poppanator@gmail.com>

Concurrent.pmod: The Result class was always stuck in a PENDING state since new copies of the result and state arrays was created in the loop in the contructor. Moved the initiation of these arrays outside of the loop.

2016-04-23

2016-04-23 12:30:02 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Concurrent: Fixed some typos.

2016-04-18

2016-04-18 18:31:50 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Concurrent: Added some more functions.

2016-04-13

2016-04-13 16:24:43 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Concurrent.Future: Added some common methods.

Also adds some more documentation.

2016-04-12

2016-04-12 16:35:24 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Concurrent: Added new module for handling asynchronous results.