Created
October 15, 2019 21:33
-
-
Save deepal/0718367d870105555c71160c62fa94c4 to your computer and use it in GitHub Desktop.
Clone Parent thread's env variables
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Worker::CloneParentEnvVars(const FunctionCallbackInfo<Value>& args) { | |
Worker* w; | |
ASSIGN_OR_RETURN_UNWRAP(&w, args.This()); | |
CHECK(w->thread_joined_); // The Worker has not started yet. | |
w->env_vars_ = w->env()->env_vars()->Clone(args.GetIsolate()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment