Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.5.2 #60

Merged
merged 5 commits into from
May 21, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
app退出线程池关闭优化
  • Loading branch information
chengpan168 committed May 21, 2023
commit f38d0062a144f73e76248b988e946c41244be0b1
4 changes: 1 addition & 3 deletions redis-pro/Common/RedisClient/RediStackClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -319,11 +319,9 @@ class RediStackClient {
self.logger.info("redis client- connection pool close")

self.closeSSH()

// self.keepaliveTask?.cancel()
}

deinit {
func shutdown() {
do {
logger.info("gracefully shutdown event loop group start...")
try self.eventLoopGroup.syncShutdownGracefully()
Expand Down
6 changes: 6 additions & 0 deletions redis-pro/Model/RedisInsanceModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ class RedisInstanceModel:ObservableObject, Identifiable {
NotificationCenter.default.addObserver(forName: NSApplication.willTerminateNotification, object: nil, queue: .main) { [self] _ in
logger.info("redis pro will exit...")
close()

shutdown()
}
)
}
Expand Down Expand Up @@ -88,4 +90,8 @@ class RedisInstanceModel:ObservableObject, Identifiable {
rediStackClient?.close()
rediStackClient = nil
}

func shutdown() -> Void {
rediStackClient?.shutdown()
}
}