Skip to content

Commit

Permalink
refactor: remove extension field in ten_loc_t
Browse files Browse the repository at this point in the history
Achieve better decoupling and flexibility for future support of cloud-edge integration.
  • Loading branch information
halajohn committed Sep 28, 2024
1 parent ca4f99e commit 638a5bf
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions core/src/ten_runtime/path/path.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,11 @@ void ten_path_set_result(ten_path_t *path, ten_shared_ptr_t *cmd_result) {
// extension might modify the cmd result (ex: add more properties),
// so we must replace the original cached cmd result here.

ten_msg_dump(path->cached_cmd_result, NULL,
"The original cached cmd result: ^m");
// NOTE: We cannot access the contents of `cached_cmd_result` here because
// it might already be in the `in path_table` of another extension in
// another extension thread. Accessing `cached_cmd_result` here could lead
// to a thread safety issue.

ten_msg_dump(cmd_result, NULL, "The new cached cmd result: ^m");

ten_shared_ptr_destroy(path->cached_cmd_result);
Expand Down

0 comments on commit 638a5bf

Please sign in to comment.