Skip to content
This repository has been archived by the owner on Dec 25, 2022. It is now read-only.

Add chapter on arbiters, with example of using these to process async events #22

Merged
merged 3 commits into from
Mar 18, 2019
Merged

Add chapter on arbiters, with example of using these to process async events #22

merged 3 commits into from
Mar 18, 2019

Conversation

Firstyear
Copy link
Contributor

No description provided.


As a result Arbiters perform a number of function. Most notably, they are able
to spawn a new OS thread, run an event loop, execute functions asynchronously
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

execute functions asynchronously

I think it would be better to say spawn asynchronous tasks since execute may imply blocking and there is no utility for that
As actual tasks are executed by event loop

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed,


fn main() {
let system = System::new("test");
Copy link
Contributor

@DoumanAsh DoumanAsh Mar 15, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be worthwhile to add that System actually has own arbiter and therefore in this example you spawn task on System's arbiter

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this is a good point.

```

## Why can't I create my own?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this section necessary?
I'm not sure what is intention here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because I wanted to add a section on "how to make extra arbiters and assign actors to them", but it seems quite ... uhh, difficult to achieve, and the api is changing a lot between the current version and the next actix version I think.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think user is supposed to create own arbiter at all?
That's why I'm not sure if this section is needed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm okay. I'll remove this part.

Copy link
Contributor

@DoumanAsh DoumanAsh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@DoumanAsh DoumanAsh merged commit 6fd0932 into actix:master Mar 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants