timeoutFn waits for the initial event signalization and then pulls the handle identifier from the input channel. With handle identifier inside the callback function, the object is queried. If the query is successful, the result is pushed to the output channel, and the done event is signaled to indic
(ctx uintptr)
| 127 | // channel, and the done event is signaled to indicate the object |
| 128 | // name can be retrieved. |
| 129 | func timeoutFn(ctx uintptr) uintptr { |
| 130 | for { |
| 131 | s, err := windows.WaitForSingleObject(tmt.ini, windows.INFINITE) |
| 132 | if err != nil || s != windows.WAIT_OBJECT_0 { |
| 133 | break |
| 134 | } |
| 135 | obj, err := QueryObjectName(<-tmt.in) |
| 136 | tmt.out <- obj |
| 137 | if err != nil { |
| 138 | if err := windows.SetEvent(tmt.done); err != nil { |
| 139 | break |
| 140 | } |
| 141 | continue |
| 142 | } |
| 143 | if err := windows.SetEvent(tmt.done); err != nil { |
| 144 | break |
| 145 | } |
| 146 | } |
| 147 | return 0 |
| 148 | } |
nothing calls this directly
no test coverage detected