Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ellectroid/asynceventhandler_basic
Asynchronous single-threaded event handler
https://github.com/ellectroid/asynceventhandler_basic
async asynchronous event event-driven event-handling event-management fifo function-pointers queue semaphore thread threads
Last synced: about 22 hours ago
JSON representation
Asynchronous single-threaded event handler
- Host: GitHub
- URL: https://github.com/ellectroid/asynceventhandler_basic
- Owner: ellectroid
- License: unlicense
- Created: 2024-02-18T15:10:27.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-02-19T10:43:02.000Z (9 months ago)
- Last Synced: 2024-02-19T19:38:03.053Z (9 months ago)
- Topics: async, asynchronous, event, event-driven, event-handling, event-management, fifo, function-pointers, queue, semaphore, thread, threads
- Language: C++
- Homepage:
- Size: 17.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AsyncEventHandler_Basic
Asynchronous single-threaded event handlerFor demonstration purposes only
AsyncEventHandler implementation
Dialect: C++20 (uses \)Properties:
- 1 thread, sleeps when idle
- 1 externally provided event handler function for all events
- 1 externally provided event parameter buffer of user-defined size
- 4 handler function parameters individual to every event
- 1 externally provided queue of events of user-defined size
- Binds event ID number to a set of parameters for the handler
- Events triggered using event number
- Supports negative event numbers (for example, for error handling events)
- Activate/deactivate handler execution on per-event and global level
- Diverse error codes in case something goes wrong
- Trivially destructible
- Buffer memory and a thread object are provided externally (doesn't manage object lifetime of anything)
- You can change internal pointers at runtime if you're into that sort of thing
- It actually seems to workIncludes a test function with detailed explanation and example of setup, use and error handling.