{"id":13576073,"url":"https://github.com/davmac314/dasynq","last_synced_at":"2026-02-27T10:23:04.260Z","repository":{"id":55103417,"uuid":"60429632","full_name":"davmac314/dasynq","owner":"davmac314","description":"Thread-safe cross-platform event loop library in C++","archived":false,"fork":false,"pushed_at":"2025-10-31T07:15:02.000Z","size":1118,"stargazers_count":184,"open_issues_count":0,"forks_count":17,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-10-31T09:09:51.910Z","etag":null,"topics":["asyncio","cross-platform","event-loops","non-blocking","robust"],"latest_commit_sha":null,"homepage":"http://davmac.org/projects/dasynq/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/davmac314.png","metadata":{"files":{"readme":"README.md","changelog":"NEWS","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2016-06-04T20:47:15.000Z","updated_at":"2025-10-31T07:15:06.000Z","dependencies_parsed_at":"2024-03-17T05:42:33.756Z","dependency_job_id":"c4454f8f-ccdc-4c8a-8b1e-a57d12eb4f45","html_url":"https://github.com/davmac314/dasynq","commit_stats":null,"previous_names":[],"tags_count":29,"template":false,"template_full_name":null,"purl":"pkg:github/davmac314/dasynq","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davmac314%2Fdasynq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davmac314%2Fdasynq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davmac314%2Fdasynq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davmac314%2Fdasynq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davmac314","download_url":"https://codeload.github.com/davmac314/dasynq/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davmac314%2Fdasynq/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29891069,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-27T09:48:51.284Z","status":"ssl_error","status_checked_at":"2026-02-27T09:48:43.992Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["asyncio","cross-platform","event-loops","non-blocking","robust"],"created_at":"2024-08-01T15:01:06.791Z","updated_at":"2026-02-27T10:23:04.203Z","avatar_url":"https://github.com/davmac314.png","language":"C++","funding_links":[],"categories":["C++","others"],"sub_categories":[],"readme":"# Dasynq\n\n_Version 2.1.5_\n\nDasynq is an event loop library similar to libevent, libev and libuv. Like other such libraries,\nit is crossplatform / portable. Unlike most other such libraries, it is intended to be completely\nusable in a multi-threaded client program, and it is written in C++; furthermore the API is\ndesigned to allow the creation of extremely robust clients, by allowing allocation of resources up\nfront (before they are needed in critical sections). However, it is also designed to be\nlightweight, and it does not require the use of threads (and so does not require linking against a\nthread library).\n\nThe existing backends include **epoll** and **kqueue**, meaning that Dasynq works well on Linux\nand various BSDs (at least OpenBSD, FreeBSD and NetBSD) as well as Mac OS X (\"macOS\" as it is now called).\nThere is also a less efficient backend based on **pselect**, and an even less efficient backend\nbased on **select**, meaning that it should also work on nearly all other POSIX-compliant systems\n(with minor caveats).\n\nDasynq is distributed under the terms of the Apache License, version 2.0, as found in the LICENSE\nfile.\n\nDasynq is written in C++11, using POSIX functions and some OS-specific system calls.\n\nSee the [web site](https://davmac.org/projects/dasynq/) for more information.\n\n\n## Event loops\n\nAn event loop library provides a means for waiting on events that occur asynchronously. One good\nexample is network input/output; in a server with multiple client connections, a mechanism is needed to\nwait until data is available, or until it is possible to write data, to one or more of the current\nconnections (and to be able to identify _which_ connections are ready). Dasynq is a multi-platform,\nthread-safe C++ library which provides such functionality.\n\nNote that an event loop generally supports managing various different kinds of event. Dasynq can be used\nfor detecting:\n- read/write readiness on sockets, pipes, and certain devices including terminals and serial lines;\n- connections to listening sockets;\n- reception of POSIX signals (such as SIGTERM); and\n- child process status notification (termination etc).\n\nIt also supports one-shot and periodic timers, against both a monotonic and adjustable system clock\n(on systems where this is possible).\n\nDasynq is fully thread-safe, allowing events to be polled and processed on any thread, unlike nearly\nevery other event loop library (some of which are thread-safe, but require that events be polled\nfrom a single thread).\n\nThere are _some_ limitations on the use the Dasynq API in a multi-threaded application. However,\nwhen used in a single-thread application, the API is just about as straight-forward as the API of most\nother event loop libraries.\n\nDasynq is also intended to allow development of extremely robust client applications. Where possible, it\nallows pre-allocation of resources to prevent allocation failures from occurring at inopportune moments\nduring program execution.\n\n\n## Using Dasynq\n\nSee [doc/USAGE.md](doc/USAGE.md) for a quick guide on how to use the Dasynq API. A full reference manual\ncan be found in the [doc/html](doc/html) folder of the repository / source bundle, or\n[online](https://davmac.org/projects/dasynq/doc/).\n\nGNU make is required to run the test suite / automated install, or you can try the contributed meson-based\nbuild.\n\nTo build with GNU make:\n\nFind or create an appropriate makefile in the `makefiles` directory and edit it to your liking.\nEither copy/link it to \"Makefile\" in the root of the source tree, or supply it via the `-f` argument to\nthe `make` (or `gmake`) command. Use the `check` target to run the test suite, or `install` to install\nthe library. The `DESTDIR` variable can be used to install to an alternative root (for packaging purposes\netc).\n\n    make -f makefiles/Makefile.linux  check\n    make -f makefiles/Makefile.linux  install  DESTDIR=/tmp/dasynq\n\nOn OpenBSD, you must install \"eg++\" or llvm; the g++ from the base system is too old (4.2 in OpenBSD 6.1;\n4.9+ is required). The existing makefile sample (Makefile.openbsd) has appropriate settings.\n\nLinux, OpenBSD, FreeBSD, NetBSD and MacOS are supported \"out of the box\". For other systems you may need to edit\nthe `dasynq-config.h` file (see instructions within). For full functionality either epoll or kqueue are\nrequired; in many BSD variants it may be possible to build by defining `DASYNQ_HAVE_KQUEUE` to `1`. If\nepoll and kqueue are not available, Dasynq will fall back to using a `pselect`-based backend (or a plain\n`select`-based backend on some systems which don't have `pselect`). \n\nAfter installation, you can use \"pkg-config\" to find the appropriate flags to compile against Dasynq,\nassuming you have pkg-config installed:\n\n    pkg-config --cflags dasynq\n    pkg-config --libs dasynq\n\nThere is also CMake support. You can add the following to your `CMakeLists.txt` file:\n\n    find_package(Dasynq 2.1.5)\n    \n    # The \"old way\":\n    #target_include_directories(testapp PRIVATE \"${DASYNQ_INCLUDE_DIRS}\")\n    #target_link_libraries(testapp PRIVATE ${DASYNQ_LINK_LIBS}\")\n    \n    # The \"new way\":\n    target_link_libraries(yourapp\n        PRIVATE Dasynq::Dasynq)\n    \n    # The \"new way\" adds the Dasynq include directory to the *system header*\n    # include path. This should not cause any problems, but if it does, you\n    # can prevent that with the following (this affects *all* imports for\n    # the 'yourapp' target):\n    set_target_properties(yourapp PROPERTIES\n        NO_SYSTEM_FROM_IMPORTED true\n    )\n\nIt is also possible to simply copy the Dasynq headers directly into your own project (you must\nrespect the terms of the license).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavmac314%2Fdasynq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavmac314%2Fdasynq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavmac314%2Fdasynq/lists"}