
Hi,
Before preparing a MemberList, I'm trying to call SemanticParserService.WaitForParse in order to consider the most recent code changes.
Unfortuantly, this call always blockes the application for the duation of the timeout.
Moreover, the semantic parser only kicks-in after WaitForParse returns.
I found this technique in your sample application in the file SimpleSyntaxLanguage.cs:In your sample code, you use the version of WaitForParse which uses a built-in 250ms timeout, so it's hard to notice that it's blocking, but if you change it to some significant timeout (say 5000ms) you can see it clearly.
Note that it is only blocking when there is actually a pending parsing request (so, in your sample app, you need to type something and then immedialy press Ctrl-Space), otherwise it returns immediately.
Thanks in advance
Before preparing a MemberList, I'm trying to call SemanticParserService.WaitForParse in order to consider the most recent code changes.
Unfortuantly, this call always blockes the application for the duation of the timeout.
Moreover, the semantic parser only kicks-in after WaitForParse returns.
I found this technique in your sample application in the file SimpleSyntaxLanguage.cs:
...
private bool ShowIntelliPromptMemberList(SyntaxEditor syntaxEditor, bool completeWord) {
// Try and ensure the compilation unit is up-to-date
SemanticParserService.WaitForParse(SemanticParserServiceRequest.GetParseHashKey(syntaxEditor.Document, syntaxEditor.Document), 5000);
...
Note that it is only blocking when there is actually a pending parsing request (so, in your sample app, you need to type something and then immedialy press Ctrl-Space), otherwise it returns immediately.
Thanks in advance