MCPcopy Create free account
hub / github.com/FEX-Emu/FEX / INotifyThreadFunc

Method INotifyThreadFunc

Source/Tools/FEXConfig/Main.cpp:342–358  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

340}
341
342void RootFSModel::INotifyThreadFunc(int INotifyFD) {
343 fasio::posix_descriptor INotify {INotifyReactor, INotifyFD};
344
345 INotify.async_wait([this, INotifyFD](fasio::error ec) {
346 // Spin through the events, we don't actually care what they are
347 constexpr size_t DATA_SIZE = (16 * (sizeof(struct inotify_event) + NAME_MAX + 1));
348 char buf[DATA_SIZE];
349 while (read(INotifyFD, buf, DATA_SIZE) > 0)
350 ;
351
352 // Queue update to the data model
353 QMetaObject::invokeMethod(this, "Reload");
354 return fasio::post_callback::repeat;
355 });
356
357 INotifyReactor.run();
358}
359
360// Returns true on success
361static bool OpenFile(fextl::string Filename) {

Callers

nothing calls this directly

Calls 3

async_waitMethod · 0.80
readFunction · 0.50
runMethod · 0.45

Tested by

no test coverage detected