File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -177,13 +177,6 @@ extern "C"
177
177
178
178
e.store (enclave);
179
179
180
- // Reset the thread ID generator. This function will exit before any
181
- // thread calls enclave_run, and without creating any new threads, so it
182
- // is safe for the first thread that calls enclave_run to re-use this
183
- // thread_id. That way they are both considered MAIN_THREAD_ID, even if
184
- // they are actually distinct std::threads.
185
- ccf::threading::reset_thread_id_generator ();
186
-
187
180
return CreateNodeStatus::OK;
188
181
}
189
182
Original file line number Diff line number Diff line change @@ -916,6 +916,13 @@ namespace ccf
916
916
ecall_completed.store (true );
917
917
flusher_thread.join ();
918
918
919
+ // Reset the thread ID generator. This function will exit before any
920
+ // thread calls enclave_run, and without creating any new threads, so it
921
+ // is safe for the first thread that calls enclave_run to re-use this
922
+ // thread_id. That way they are both considered MAIN_THREAD_ID, even if
923
+ // they are actually distinct std::threads.
924
+ ccf::threading::reset_thread_id_generator ();
925
+
919
926
if (create_status != CreateNodeStatus::OK)
920
927
{
921
928
LOG_FAIL_FMT (
You can’t perform that action at this time.
0 commit comments