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

Method wakeUpFromExternalThread

Libraries/Async/Async.cpp:984–993  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

982}
983
984SC::Result SC::AsyncEventLoop::wakeUpFromExternalThread()
985{
986 if (not internal.wakeUpPending.exchange(true))
987 {
988 // This executes if current thread is lucky enough to atomically exchange pending from false to true.
989 // This effectively allows coalescing calls from different threads into a single notification.
990 return internal.kernelQueue.get().wakeUpFromExternalThread();
991 }
992 return Result(true);
993}
994
995SC::Result SC::AsyncEventLoop::associateExternallyCreatedFileDescriptor(FileDescriptor& descriptor)
996{

Callers 4

wakeUpMethod · 0.80
closeMethod · 0.80
executeWakeUpsMethod · 0.80

Calls 4

fetch_addMethod · 0.80
ResultClass · 0.70
exchangeMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected