| 73 | |
| 74 | template<class T> |
| 75 | EventQueue<T>* GetInMemoryEventQueue() { |
| 76 | static std::mutex mtx; |
| 77 | static EventQueue<T>* q = NULL; |
| 78 | if (q == NULL) { |
| 79 | mtx.lock(); |
| 80 | if (q == NULL) { |
| 81 | q = new EventQueue<T>(GLOBAL_FLAG(InMemoryQueueSize)); |
| 82 | } |
| 83 | mtx.unlock(); |
| 84 | } |
| 85 | return q; |
| 86 | } |
| 87 | |
| 88 | } // namespace graphlearn |
| 89 |
nothing calls this directly
no outgoing calls
no test coverage detected