rferraro / eventual Goto Github PK
View Code? Open in Web Editor NEWA futures library with continuations, inspired by the upcoming C++ Extensions for Concurrency (ISO/IEC TS 19571:xxxx)
License: MIT License
A futures library with continuations, inspired by the upcoming C++ Extensions for Concurrency (ISO/IEC TS 19571:xxxx)
License: MIT License
Update the C++ Compilers used in the Travis CI process to use the current versions of Clang and GCC.
Debugging a leak issue led to the discovery that callbacks passed to eventual::shared_future::then()
were never cleaned up. Further investigation suggests some parts of the State chain are retained whole. Below is a demonstrative test case:
#include <eventual/eventual.h>
#include <cstdio>
#include <memory>
static int canary_count = 0;
struct canary
{
canary() { canary_count += 1; printf("+canary (%d)\n", canary_count); }
~canary() { canary_count -= 1; printf("-canary (%d)\n", canary_count); }
char block[1*1024*1024*1024];
};
static void promise_scope()
{
eventual::promise<void> promise;
auto fut = promise.get_future();
auto shared_canary = std::make_shared<canary>();
fut.then([shared_canary] (auto&) {});
promise.set_value();
}
int main()
{
promise_scope();
return 0;
}
The output of the above is
+canary (1)
and valgrind indicates:
in use at exit: 1,073,742,464 bytes in 6 blocks
One fix seems to be explicitly clearing the callback list after invocation, but I do not know whether I am just working around a deeper problem, so have not created a pull request. The change is visible in lsr0/eventual@fe01399 for reference.
Update the C++ Compilers used in the AppVeyor CI process to include the latest version of Visual Studio.
Rather than requiring manual generation of build files for Visual Studio 2017, add support in the CMake scripts to allow use of Visual Studio's built-in support of CMake,
I am unable to merge a pull request (#1) from @lsr0, because Travis CI is failing with an unrelated error:
gtest/1.7.0@lasote/stable: WARN: Your conan's client version is deprecated for the current remote (v0.20.0). Upgrade conan client.
ERROR: All remotes failed
CMake Error at library/test/CMakeLists.txt:64 (message):
Conan.io failed to install this project's dependencies, error: 1
While working on making updates to the CI Docker Images for newer C++ compilers, it's been noted there may be additional compatibility issues against newer versions of libstdc++. Under Travis CI, the build is returning errors related to "error: calling a private constructor of class 'std::future_error'". See: TravisCI Job Log.
A fix for these issues should be resolvable in a similar fashion to PullRequest #1. The build errors were not noted at the PullRequest #1's merge-time because the CI infrastructure hadn't yet started testing with newer compilers and libstdc++ versions.
See: llvm-announce
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.