MCPcopy Create free account
hub / github.com/VirtualGL/virtualgl / spoil

Method spoil

util/GenericQ.cpp:60–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58
59
60void GenericQ::spoil(void *item, SpoilCallback spoilCallback)
61{
62 if(deadYet) return;
63 if(item == NULL) THROW("NULL argument in GenericQ::spoil()");
64 CriticalSection::SafeLock l(mutex);
65 if(deadYet) return;
66 void *dummy = NULL;
67 while(1)
68 {
69 get(&dummy, true); if(!dummy) break;
70 spoilCallback(dummy);
71 }
72 add(item);
73}
74
75
76void GenericQ::add(void *item)

Callers 3

sendFrameMethod · 0.80
sendFrameMethod · 0.80
sendFrameMethod · 0.80

Calls 2

getFunction · 0.50
addFunction · 0.50

Tested by

no test coverage detected