MCPcopy Create free account
hub / github.com/Pagghiu/SaneCppLibraries / reloadConfig

Function reloadConfig

Examples/AwaitConfigReload/AwaitConfigReload.cpp:39–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37}
38
39static AwaitTask reloadConfig(AwaitEventLoop& await, ThreadPool& threadPool, ConfigLoadJob& job)
40{
41 job.task = readConfigFile(await, threadPool, job);
42 SC_CO_TRY(co_await await.spawnAndWait(job.task));
43
44 if (job.result.data.sizeInBytes() == 0)
45 {
46 co_return Result::Error("AwaitConfigReload loaded an empty config");
47 }
48
49 co_return Result(true);
50}
51
52static Result runAwaitConfigReload()
53{

Callers 1

runAwaitConfigReloadFunction · 0.85

Calls 5

readConfigFileFunction · 0.85
spawnAndWaitMethod · 0.80
ErrorEnum · 0.50
ResultClass · 0.50
sizeInBytesMethod · 0.45

Tested by

no test coverage detected