Close shuts down the engine
()
| 228 | |
| 229 | // Close shuts down the engine |
| 230 | func (e *Engine) Close() { |
| 231 | e.stop <- true |
| 232 | |
| 233 | // TODO: better way to kill all goroutines, to prevent logs from writing |
| 234 | // to test logger after test ends, which cases panic and race |
| 235 | time.Sleep(time.Millisecond) |
| 236 | for !e.q.IsStopped() { |
| 237 | time.Sleep(time.Second) |
| 238 | } |
| 239 | } |