()
| 183 | return http.StatusInternalServerError |
| 184 | } |
| 185 | func (info *RequestInfo) waitLogDone() { |
| 186 | store := info.store |
| 187 | if store.LogDone(false) { |
| 188 | return |
| 189 | } |
| 190 | |
| 191 | go func() { |
| 192 | // max waiting time = 10ms |
| 193 | timer := time.NewTimer(10 * time.Millisecond) |
| 194 | <-timer.C |
| 195 | store.LogDone(true) |
| 196 | timer.Stop() |
| 197 | }() |
| 198 | store.Wait() |
| 199 | } |
| 200 | func (info *RequestInfo) Notify() { |
| 201 | select { |
| 202 | case info.SyncChannel <- struct{}{}: |
no test coverage detected