diff options
author | rowanbeentje <rowan@beent.je> | 2010-03-22 23:07:03 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2010-03-22 23:07:03 +0000 |
commit | 9892a96b80073686b0dd1205d4f859b10d32336f (patch) | |
tree | f4f4caaa72f5983dfc23a1f686603b61baf0374c /Frameworks/MCPKit | |
parent | 6728ccd128a5320256ac51c0a617f0c76b331ea7 (diff) | |
download | sequelpro-9892a96b80073686b0dd1205d4f859b10d32336f.tar.gz sequelpro-9892a96b80073686b0dd1205d4f859b10d32336f.tar.bz2 sequelpro-9892a96b80073686b0dd1205d4f859b10d32336f.zip |
- Simplify table source table setup and make thread safe. This should address http://log.sequelpro.com/view/43 , http://log.sequelpro.com/view/46
- Improve keepalive timer interaction - this should address http://log.sequelpro.com/view/74 and http://log.sequelpro.com/view/71
- Further thread safety improvements to Custom Query, Table Document, and the history controller
Diffstat (limited to 'Frameworks/MCPKit')
-rw-r--r-- | Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m b/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m index 1a4786ec..7f5c4365 100644 --- a/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m +++ b/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m @@ -689,6 +689,12 @@ void pingConnectionTask(void *ptr) */ - (void)stopKeepAliveTimer { + // Stop keepalives on the main thread to avoid memory issues + if (![NSThread isMainThread]) { + [self performSelectorOnMainThread:@selector(stopKeepAliveTimer) withObject:nil waitUntilDone:NO]; + return; + } + if (keepAliveThread != NULL) pthread_cancel(keepAliveThread), keepAliveThread = NULL; if (!keepAliveTimer) return; [keepAliveTimer invalidate]; |