Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use auto cleanup for actor in node bindings #1439

Merged
merged 5 commits into from
Jul 25, 2018
Merged

Conversation

kevinkreiser
Copy link
Member

@kevinkreiser kevinkreiser commented Jul 24, 2018

The node bindings weren't using the auto-cleanup function for the actor_t object. since we are most of the way through the request to pbf refactor this didnt matter too much, but some of the stuff in the refactor isnt all the way done. what this means is that for each request there is some state left around in thor::worker_t for example. simultaneously, actor_t defaults auto-cleanup to false. by setting it to true we make sure to clear out this state on every request. this wont be a problem once request state lives in the pbf request object. for now we are in a bit of an in between where some of it is still within the worker classes

@@ -97,7 +97,8 @@ class Actor {
}

private:
explicit Actor(const char* config) : actor(make_conf(config)), env_(nullptr), wrapper_(nullptr) {
explicit Actor(const char* config)
: actor(make_conf(config), true), env_(nullptr), wrapper_(nullptr) {
Copy link
Member Author

Choose a reason for hiding this comment

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

auto-cleanup defaults to false. this is useful if you are some kind of service that wants explicit control over when you do cleanup. for example, if you want to be as fast as possible for your requesters, you probably want to call cleanup only after you've returned the response to them (this is how prime_server works). depending on the size of the request it shaves that extra little bit latency off the response time.

allierowan
allierowan previously approved these changes Jul 25, 2018
Copy link

@allierowan allierowan left a comment

Choose a reason for hiding this comment

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

👍 I'll merge this one since I'm going to publish a node release

@allierowan allierowan merged commit 865fdc2 into master Jul 25, 2018
@allierowan allierowan deleted the kk_node_autocleanup branch July 25, 2018 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants