MCPcopy Create free account
hub / github.com/bailey27/cppcryptfs / ClearThreadProc

Function ClearThreadProc

libcppcryptfs/util/KeyCache.cpp:68–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66}
67
68static DWORD WINAPI ClearThreadProc(_In_ LPVOID lpParameter)
69{
70 HANDLE hEvent = lpParameter;
71
72 while (true) {
73 auto wait_result = WaitForSingleObject(hEvent, 1000);
74 if (wait_result == WAIT_TIMEOUT) {
75 KeyCache::GetInstance()->Clear();
76 } else if (wait_result == WAIT_OBJECT_0) {
77 break;
78 } else {
79 assert(false);
80 }
81 }
82
83 return 0;
84}
85
86
87bool KeyCache::InitClearThread()

Callers

nothing calls this directly

Calls 1

ClearMethod · 0.45

Tested by

no test coverage detected