Skip to content

p5-vbnekit/async_primitives.prototypes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

p5-async_primitives

C++ 17 library with asynchronous primitives (prototype state).

Hello, world

::ap::event::Dispatcher<::std::string_view> dispatcher_;

dispatcher_.subscribe([&] (auto const &event) {
    application_.log << event;
});

application_.on_ready([dispatcher_ = ::std::move(dispatcher_)] {
    dispatcher_.dispatch("Hello, world!");
});

Basic primitives

  1. Event dispatcher & Event source:
    yet another signal/slot implementation
    with Shared Subscripton ("weak"|"strong") entity as Connection
  2. Promise & Future: not implemented yet
  3. Coroutines adapters: not implemented yet

Examples

Check out examples directory.

$${\color{red}WARNING}$$

This is unstable prototype and any things (commit history, api, abi, etc) may be changed.