{"id":13418449,"url":"https://github.com/Amanieu/asyncplusplus","last_synced_at":"2025-03-15T03:31:10.995Z","repository":{"id":7318190,"uuid":"8636694","full_name":"Amanieu/asyncplusplus","owner":"Amanieu","description":"Async++ concurrency framework for C++11","archived":false,"fork":false,"pushed_at":"2024-10-11T12:13:08.000Z","size":322,"stargazers_count":1390,"open_issues_count":14,"forks_count":202,"subscribers_count":92,"default_branch":"master","last_synced_at":"2025-03-05T16:35:35.879Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Amanieu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-03-07T21:15:44.000Z","updated_at":"2025-03-03T03:28:14.000Z","dependencies_parsed_at":"2024-05-01T23:11:27.549Z","dependency_job_id":"dc189e8a-e8ef-4ce5-ad17-24c27cc3a2fd","html_url":"https://github.com/Amanieu/asyncplusplus","commit_stats":{"total_commits":179,"total_committers":13,"mean_commits":13.76923076923077,"dds":0.1061452513966481,"last_synced_commit":"4159da79e20ad6d0eb1f13baa0f10e989edd9fba"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Amanieu%2Fasyncplusplus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Amanieu%2Fasyncplusplus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Amanieu%2Fasyncplusplus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Amanieu%2Fasyncplusplus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Amanieu","download_url":"https://codeload.github.com/Amanieu/asyncplusplus/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243681024,"owners_count":20330152,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-30T22:01:02.467Z","updated_at":"2025-03-15T03:31:09.499Z","avatar_url":"https://github.com/Amanieu.png","language":"C++","readme":"Async++\n=======\n\nAsync++ is a lightweight concurrency framework for C++11. The concept was inspired by the [Microsoft PPL library](http://msdn.microsoft.com/en-us/library/dd492418.aspx) and the [N3428](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3428.pdf) C++ standard proposal.\n\nExample\n-------\nHere is a short example which shows some features of Async++:\n\n```c++\n#include \u003ciostream\u003e\n#include \u003casync++.h\u003e\n\nint main()\n{\n    auto task1 = async::spawn([] {\n        std::cout \u003c\u003c \"Task 1 executes asynchronously\" \u003c\u003c std::endl;\n    });\n    auto task2 = async::spawn([]() -\u003e int {\n        std::cout \u003c\u003c \"Task 2 executes in parallel with task 1\" \u003c\u003c std::endl;\n        return 42;\n    });\n    auto task3 = task2.then([](int value) -\u003e int {\n        std::cout \u003c\u003c \"Task 3 executes after task 2, which returned \"\n                  \u003c\u003c value \u003c\u003c std::endl;\n        return value * 3;\n    });\n    auto task4 = async::when_all(task1, task3);\n    auto task5 = task4.then([](std::tuple\u003casync::task\u003cvoid\u003e,\n                                          async::task\u003cint\u003e\u003e results) {\n        std::cout \u003c\u003c \"Task 5 executes after tasks 1 and 3. Task 3 returned \"\n                  \u003c\u003c std::get\u003c1\u003e(results).get() \u003c\u003c std::endl;\n    });\n\n    task5.get();\n    std::cout \u003c\u003c \"Task 5 has completed\" \u003c\u003c std::endl;\n\n    async::parallel_invoke([] {\n        std::cout \u003c\u003c \"This is executed in parallel...\" \u003c\u003c std::endl;\n    }, [] {\n        std::cout \u003c\u003c \"with this\" \u003c\u003c std::endl;\n    });\n\n    async::parallel_for(async::irange(0, 5), [](int x) {\n        std::cout \u003c\u003c x;\n    });\n    std::cout \u003c\u003c std::endl;\n\n    int r = async::parallel_reduce({1, 2, 3, 4}, 0, [](int x, int y) {\n        return x + y;\n    });\n    std::cout \u003c\u003c \"The sum of {1, 2, 3, 4} is \" \u003c\u003c r \u003c\u003c std::endl;\n}\n\n// Output (order may vary in some places):\n// Task 1 executes asynchronously\n// Task 2 executes in parallel with task 1\n// Task 3 executes after task 2, which returned 42\n// Task 5 executes after tasks 1 and 3. Task 3 returned 126\n// Task 5 has completed\n// This is executed in parallel...\n// with this\n// 01234\n// The sum of {1, 2, 3, 4} is 10\n```\n\nSupported Platforms\n-------------------\n\nThe only requirement to use Async++ is a C++11 compiler and standard library. Unfortunately C++11 is not yet fully implemented on most platforms. Here is the list of OS and compiler combinations which are known to work.\n\n- Linux: Works with GCC 4.7+, Clang 3.2+ and Intel compiler 15+.\n- Mac: Works with Apple Clang (using libc++). GCC also works but you must get a recent version (4.7+).\n- iOS: Works with Apple Clang (using libc++). Note: because iOS has no thread local support, the library uses a workaround based on pthreads.\n- Windows: Works with GCC 4.8+ (with pthread-win32) and Visual Studio 2013+.\n\nBuilding and Installing\n-----------------------\nInstructions for compiling Async++ and using it in your code are available on the [Building and Installing](https://github.com/Amanieu/asyncplusplus/wiki/Building-and-Installing) page.\n\nDocumentation\n------------\nThe Async++ documentation is split into four parts:\n- [Tasks](https://github.com/Amanieu/asyncplusplus/wiki/Tasks): This describes task objects which are the core Async++. Reading this first is strongly recommended.\n- [Parallel algorithms](https://github.com/Amanieu/asyncplusplus/wiki/Parallel-algorithms): This describes functions to run work on ranges in parallel.\n- [Schedulers](https://github.com/Amanieu/asyncplusplus/wiki/Schedulers): This describes the low-level details of Async++ and how to customize it.\n- [API Reference](https://github.com/Amanieu/asyncplusplus/wiki/API-Reference): This gives detailed descriptions of all the classes and functions available in Async++.\n\nContact\n-------\nYou can contact me by email at amanieu@gmail.com.\n","funding_links":[],"categories":["TODO scan for Android support in followings","Concurrency","Uncategorized","C++"],"sub_categories":["Uncategorized"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAmanieu%2Fasyncplusplus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAmanieu%2Fasyncplusplus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAmanieu%2Fasyncplusplus/lists"}