Branch: Tag:

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].

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].

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].

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].

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: Cleanup.

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 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].

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.