MCPcopy Create free account
hub / github.com/bruderstein/nppPluginManager / waitForHandle

Method waitForHandle

libinstall/src/InternetDownload.cpp:98–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

96}
97
98BOOL InternetDownload::waitForHandle(HANDLE handle)
99{
100 HANDLE waitHandles[2];
101 waitHandles[0] = m_cancelToken.getToken();
102 waitHandles[1] = handle;
103 int waitResponse = WaitForMultipleObjects(2, waitHandles, FALSE, 60000);
104
105 switch(waitResponse) {
106 case WAIT_OBJECT_0:
107 {
108 // cancelled
109 return FALSE;
110 }
111
112 case WAIT_TIMEOUT:
113 {
114 // More than 60seconds for response
115 return FALSE;
116 }
117
118 case WAIT_FAILED:
119 {
120 return FALSE;
121 }
122 }
123
124 return TRUE;
125}
126
127DOWNLOAD_STATUS InternetDownload::getData(writeData_t writeData, void *context)
128{

Callers

nothing calls this directly

Calls 1

getTokenMethod · 0.80

Tested by

no test coverage detected