Crate topograph

Crate topograph 

Source
Expand description

A tiny library offering a concurrent work queue for synchronous or asynchronous tasks, as well as an implementation of topological sort built on top of it

This crate contains two main components, each with their own (slightly different) use cases:

  • executor contains the core logic for the work queue, as well as the necessary types and logic to initialize it
  • graph is a topological sort implementation for handling more complex cases with inter-task dependencies

The documentation for each of the above modules contains example code for each use case.

Modules§

executor
Functionality for constructing and running work-queue executors
graph
A concurrent implementation of topological sort (toposort, for short) for handling task dependencies
prelude
Common traits used when working with topograph

Traits§

AsyncHandler
A trait to work around the inability to express async lifetimes with Fn
ExecutorBuilder
Builder type for a work queue executor
ExecutorBuilderAsync
Helper trait for describing an ExecutorBuilder that can accept any AsyncHandler as a synchronous task
ExecutorBuilderCore
Trait describing common types for both ExecutorBuilderSync and ExecutorBuilderAsync
ExecutorBuilderSync
Helper trait for describing an ExecutorBuilder that can accept any Fn as a synchronous task
ExecutorCore
Abstraction over a concurrent work queue executor
ExecutorHandle
The smallest common abstraction over a work queue and associated task handle, providing solely a push function