`try_flush` doesn't flush some events stored in `@map` when `@queue` is not empty.
So we should use `close` method approach instead of `try_flush`.