Avoid race condition (e.g. when closing windows)
commit730b41ece1a7bfc28f0fe8fd836bfa1ab4ac0e3b
authorBjorn Winckler <bjorn.winckler@gmail.com>
Thu, 27 Aug 2009 16:16:44 +0000 (27 18:16 +0200)
committerBjorn Winckler <bjorn.winckler@gmail.com>
Thu, 27 Aug 2009 16:16:44 +0000 (27 18:16 +0200)
tree2299c37dce94a74c5035bf931ceff6de8d80fe89
parent1c09387bf4485d190d37f83544a16c921ae267c2
Avoid race condition (e.g. when closing windows)

The app may become multithreaded e.g. due to the open panel being
displayed.  In this case connectionDidDie notifications may arrive
outside the main thread, possibly leading to windows being closed
simultaneously on multiple threads.  This scenario could happen e.g.
when quitting with multiple windows open.

To avoid this situation performSelectorOnMainThread: is used instead of
performSelector:.
src/MacVim/MMAppController.m
src/MacVim/MMVimController.m