puddle

Types

pub type BookkeepingMessage(resource_type, result_type) {
  Shutdown
  PutBack(
    process.Subject(UsageMessage(resource_type, result_type)),
  )
  Checkout(
    process.Subject(
      Result(
        process.Subject(UsageMessage(resource_type, result_type)),
        Nil,
      ),
    ),
  )
}

Constructors

  • Shutdown
  • PutBack(
      process.Subject(UsageMessage(resource_type, result_type)),
    )
  • Checkout(
      process.Subject(
        Result(
          process.Subject(UsageMessage(resource_type, result_type)),
          Nil,
        ),
      ),
    )
pub type UsageMessage(resource_type, result_type) {
  UsageMessage(
    fn(resource_type) -> result_type,
    process.Subject(Result(result_type, Nil)),
  )
}

Constructors

  • UsageMessage(
      fn(resource_type) -> result_type,
      process.Subject(Result(result_type, Nil)),
    )

Functions

pub fn start_manager(size: Int, new_resource: fn() ->
    Result(a, Nil)) -> Result(
  Subject(BookkeepingMessage(a, b)),
  Nil,
)
Search Document