Skip to content

Fix #159: LanguageServer.Shutdown hangs on flush #160

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

Merged
merged 1 commit into from
Feb 16, 2016

Conversation

daviwil
Copy link
Contributor

@daviwil daviwil commented Feb 16, 2016

The change fixes an issue in the LanguageServer's Shutdown method where
buffered output in the OutputDebouncer gets flushed before shutting down.
The problem here is the Wait call which blocks the message dispatcher
thread from completing the OutputDebouncer.OnFlush method's SendEvent
call. The fix is to change the Shutdown method to async so that the
OnFlush call can be awaited, unblocking the message dispatcher thread's
SynchronizationContext for the SendEvent call to complete.

The change fixes an issue in the LanguageServer's Shutdown method where
buffered output in the OutputDebouncer gets flushed before shutting down.
The problem here is the Wait call which blocks the message dispatcher
thread from completing the OutputDebouncer.OnFlush method's SendEvent
call.  The fix is to change the Shutdown method to async so that the
Flush call can be awaited, unblocking the message dispatcher thread's
SynchronizationContext for the SendEvent call to complete.
@daviwil daviwil force-pushed the daviwil/shutdown-hang-fix branch from 3228c57 to 171afa2 Compare February 16, 2016 02:07
daviwil added a commit that referenced this pull request Feb 16, 2016
Fix #159: LanguageServer.Shutdown hangs on flush
@daviwil daviwil merged commit dda82dc into master Feb 16, 2016
@daviwil daviwil deleted the daviwil/shutdown-hang-fix branch February 16, 2016 04:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants