MCPcopy Create free account
hub / github.com/3rdparty/libprocess / async_function

Function async_function

src/posix/libevent/libevent.cpp:44–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42
43
44void async_function(evutil_socket_t socket, short which, void* arg)
45{
46 event* ev = reinterpret_cast<event*>(arg);
47 event_free(ev);
48
49 std::queue<lambda::function<void()>> q;
50
51 synchronized (functions_mutex) {
52 std::swap(q, *functions);
53 }
54
55 while (!q.empty()) {
56 q.front()();
57 q.pop();
58 }
59}
60
61
62void run_in_event_loop(

Callers

nothing calls this directly

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected