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

Properly set execution context for on-the-fly actor tasks #39

Merged
merged 1 commit into from Oct 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 4 additions & 5 deletions include/hiactor/core/root_actor_group.hh
Expand Up @@ -90,7 +90,6 @@ private:
};

extern __thread root_actor_group* local_actor_engine;
extern __thread actor_base* local_execution_context;

void allocate_actor_engine();

Expand All @@ -100,13 +99,13 @@ root_actor_group& actor_engine() {
}

inline
void set_local_execution_context(actor_base* exec_ctx) {
local_execution_context = exec_ctx;
void set_local_execution_context(seastar::execution_context* exec_ctx) {
seastar::set_local_ec(exec_ctx);
}

inline
actor_base* get_local_execution_ctx() {
return local_execution_context;
seastar::execution_context* get_local_execution_ctx() {
return seastar::get_local_ec();
}

} // namespace hiactor
1 change: 0 additions & 1 deletion src/core/root_actor_group.cc
Expand Up @@ -327,6 +327,5 @@ void allocate_actor_engine() {
}

__thread root_actor_group* local_actor_engine{nullptr};
__thread actor_base* local_execution_context = nullptr;

} // namespace hiactor