backyard 1.0.0 copy "backyard: ^1.0.0" to clipboard
backyard: ^1.0.0 copied to clipboard

long-lived isolate with generic way of execution functions

Backyard #

Spawn an abstraction of a permanent isolate called Backyard on which you can execute arbitrary functions - and they are running on a separate thread. This is useful since spawning an isolate still takes 15+ ms and the average latency of passing a function back and forth through Backyard is around 1ms.

    final backyard = Backyard();

    // initialise backyard (takes around 15ms)
    await backyard.init();

    // executes an arbitrary function (takes 1ms)
    final result = await backyard.execute<int>(() => 1 + 2); // returns 3
14
likes
90
pub points
0%
popularity

Publisher

verified publisherquantumgray.tech

long-lived isolate with generic way of execution functions

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

logger

More

Packages that depend on backyard