actix-net
actix-net copied to clipboard
Add a builder for arbiter + alive method
PR Type
Feature
PR Checklist
Check your PR fulfills the following:
- [x] Tests for the changes have been added / updated.
- [x] Documentation comments have been added / updated.
- [x] A changelog entry has been made for the appropriate packages.
- [x] Format code with the latest stable rustfmt
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.