actix / actix-net

A collection of lower-level libraries for composable network services.
https://actix.rs
Apache License 2.0
706 stars 345 forks source link

Add a builder for arbiter + alive method #557

Open Sytten opened 4 months ago

Sytten commented 4 months ago

PR Type

Feature

PR Checklist

Check your PR fulfills the following:

Overview

Builder

This adds a builder for the arbiter, allowing more customization of the thread used by the arbiter.

The first customizable I added was the name, this allows us to differentiate the different arbiters better since they are not all used for the same purpose.

Alive

I also added an alive method on the arbiter so the caller can try to detect dead arbiters before sending it a future since it consumes it. Otherwise you need to have a clone future which is not good most of the time.

robjtede commented 4 months ago

LGTM from a quick look but needs a manual rebase (which I don't have perms to do on this PR).