Skip to content

Commit 2e5b6ac

Browse files
committed
MUST REVERT: add delayed thread
1 parent 8b71a5b commit 2e5b6ac

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ jobs:
124124
git config --global --add safe.directory /__w/CCF/CCF
125125
mkdir build
126126
cd build
127-
cmake -GNinja -DCMAKE_BUILD_TYPE=Debug ..
127+
cmake -GNinja -DCMAKE_BUILD_TYPE=Debug -DSAN=ON -DUSE_SNMALLOC=OFF ..
128128
ninja
129129
shell: bash
130130

src/host/run.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,7 @@ namespace ccf
422422
process_launcher.register_message_handlers(
423423
buffer_processor.get_dispatcher());
424424

425+
uv_work_t work_handle;
425426
{
426427
// provide regular ticks to the enclave
427428
const asynchost::Ticker ticker(config.tick_interval, writer_factory);
@@ -1007,6 +1008,13 @@ namespace ccf
10071008
threads.emplace_back(enclave_thread_start, i);
10081009
}
10091010

1011+
auto do_work = [](uv_work_t* handle) {
1012+
(void)handle;
1013+
std::this_thread::sleep_for(5s);
1014+
LOG_INFO_FMT("Accessing global resources");
1015+
};
1016+
uv_queue_work(uv_default_loop(), &work_handle, do_work, nullptr);
1017+
10101018
LOG_INFO_FMT("Entering event loop");
10111019
uv_run(uv_default_loop(), UV_RUN_DEFAULT);
10121020
LOG_INFO_FMT("Exited event loop");

0 commit comments

Comments
 (0)