| 109 | HotReloadOptionsStorage hotReloadOptionsStorage; |
| 110 | |
| 111 | Result create() |
| 112 | { |
| 113 | currentThreadID = Thread::CurrentThreadID(); |
| 114 | lastEventTime.snap(); |
| 115 | SocketNetworking::initNetworking(); |
| 116 | AsyncEventLoop::Options options; |
| 117 | #if SC_PLATFORM_LINUX && 0 |
| 118 | // Just for testing purposes, we can force using epoll instead of io_uring |
| 119 | options.apiType = AsyncEventLoop::Options::ApiType::ForceUseEpoll; |
| 120 | #endif |
| 121 | SC_TRY(eventLoop.create(options)); |
| 122 | timeout.callback = [this](AsyncLoopTimeout::Result& result) { onTimeout(result); }; |
| 123 | SC_TRY(timeout.start(eventLoop, Time::Milliseconds(state.timeoutOccursEveryMs))); |
| 124 | eventLoopMonitor.onNewEventsAvailable = []() { sokol_wake_up(); }; |
| 125 | SC_TRY(eventLoopMonitor.create(eventLoop)); |
| 126 | SC_TRY(buildHotReloadOptions(hotReloadOptionsStorage)); |
| 127 | const HotReloadSystem::Options hotReloadOptions = {hotReloadOptionsStorage.examplesPath.view(), |
| 128 | hotReloadOptionsStorage.defaultIncludePathsText.view()}; |
| 129 | SC_TRY(hotReloadSystem.create(eventLoop, hotReloadOptions)); |
| 130 | SC_TRY(hotReloadSystem.syncRegistry()); |
| 131 | return Result(true); |
| 132 | } |
| 133 | |
| 134 | void resetLastEventTime() { lastEventTime.snap(); } |
| 135 |
no test coverage detected