Skip to content

Releases: Naios/continuable

4.2.2

12 Sep 17:14
Compare
Choose a tag to compare
Ensure that continuables that are resolved immediately are always sym…

4.2.1

03 Jan 16:11
Compare
Choose a tag to compare
  • Maintainance & various bug fixes

Continuable 4.1.0

04 Nov 12:07
Compare
Choose a tag to compare

Continuable 4.1.0

Contains various follow up fixes for version 4.0.0:

Continuable 4.0.0

06 Apr 15:38
Compare
Choose a tag to compare

See the release notes here.

Continuable 3.0.0

12 Mar 11:03
Compare
Choose a tag to compare

See the release notes here.

Continuable 3.0.0 Alpha 1

06 Mar 22:26
Compare
Choose a tag to compare
Pre-release

This is an unstable release

Continuable 2.0.0

30 Jan 21:39
Compare
Choose a tag to compare

Zero cost futures now with error handling and co_await support


In version 2.0 the library was heavily improved in multiple ways:

Error handling

Usually it is inconvenient to handle error codes and exceptions in an asynchronous context, as we all know std::future supports error handling through exceptions already. We now introduce this capability to the continuable library while allowing error codes to be used as well.

Consider the function cti::continuable<> get_bad_continuable() which always resolves through an error, then you may handle the error code or exception as following:

get_bad_continuable()
  .then([] {
    // ... never invoked
  })
  .then([] {
    // ... never invoked as well
  })
  .fail([] (std::exception_ptr e) {
    try {
      std::rethrow_exception(e);
    } catch(std::exception const& e) {
      // Handle the exception here
    }
  });

Abstracting callbacks as promises

Since a callback may be called through an error or result the cri::promise class was added in order ro provide a similar interface to std::promise:

auto http_request(std::string url) {
return cti::make_continuable<std::string>([url = std::move(url)](cti::promise<std::string> /*or auto&&*/ promise) {
  // Perform the actual request through a different library,
  // resolve the promise upon completion of the task.
  promise.set_value("<html> ... </html>");
 // ...or promise.set_exception(...);
});
}

co_await support

Experimental coroutine (co_await and co_return) support was added, this is available on MSVC 2017 and Clang 5.0.

int i = co_await cti::make_continuable<int>([](auto&& promise) {
  promise.set_value(0);
});

Minor improvements

The library was improved in other ways:

  • constexpr and noexcept improvements
  • Compile-time improvements
  • Documentation improvements

Header split

Since the overall library size was increased the headers were split into smaller chunks.

Release v1.0.0

06 Mar 20:29
Compare
Choose a tag to compare

Continuable - Release v1.0.0

This is the first stable release of the continuable library.

Changelog

  • Documentation and readme changes
  • Change the assertion type of some GTest macros from expected to assertion.

Beta release v0.8.0

03 Mar 16:21
Compare
Choose a tag to compare
Beta release v0.8.0 Pre-release
Pre-release

Continuable - Release v0.8.0

This is the second pre-release of the continuable library.

Changelog

  • Fixes a major issue with handling the ownership for consumed continuables which led to unintended invocations.
  • Adds partial application support which makes it possible to chain callbacks which accept less arguments then the curret signature.
    http_request("github.com")
      .then([] {
        // ...
      });
  • Adds Support for sequential invocation:
    http_request("github.com") >> http_request("atom.io")
      .then([] (std::string github, std::string atom) {
        // ...
      });

Beta release v0.7.0

25 Feb 23:44
Compare
Choose a tag to compare
Beta release v0.7.0 Pre-release
Pre-release

Continuable - Release v0.7.0

This is the first public release of the continuable library and ships with:

  • Continuation syntactic sugar
  • Executor support
  • Connection support