Skip to content
/ actor-- Public

A header-only C++17 type-safe actor model threading library

License

Notifications You must be signed in to change notification settings

Leont/actor--

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a header-only C++17 library implementing actor-based threading.

Messages can be send using the send method, taking zero or more arguments:

  handle.send(1, "foo"s);

And received using the receive function:

  receive(
    [] (int number, const std::string& description) {
      // ...
    },
    [] (const some_object&) {
      // ...
    },
    [] (stop) {
      // stop the loop
    }
  );

Receive will match each message against each selector, and will return when it finds a match. One can also receive with a timeout.

A more extensive example can be found in the examples/ folder, along with its erlang equivalent (taken from the Debian language shoot-out).

This software may by used and distributed under the ISC licence

About

A header-only C++17 type-safe actor model threading library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published