Synchronous wait for SemanticParserService

SyntaxEditor for Windows Forms Forum

Posted 11 years ago by Tobias Lingemann - Software Devolpment Engineer, Vector Informatik GmbH
Version: 12.1.0288
Avatar

Hi,

I was wondering why it is not possible to wait synchronously for the parser service to finish all pending requests.
I know you can wait for pending requests to finish, but the currently active request is not in the list of pending requests and I don't have any other way to get the parse hash key. For example because the parsed file is not openend, but used in the project context via the SourceProjectContent class in the .net add-on.
If I am just spinning in the main thread to wait until the parser service is no longer busy, I end up with a dead lock, because somehow the parser service seems to wait for the main thread.

Right now the only option for me is to check if the service is busy and try again in next idle.


Best regards, Tobias Lingemann.

Comments (2)

Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Tobias,

I'm not sure if you saw, but the SourceProjectContent.LoadForCode and LoadForFile methods return the parse hash key for the parse request they created.


Actipro Software Support

Posted 11 years ago by Tobias Lingemann - Software Devolpment Engineer, Vector Informatik GmbH
Avatar

I did not know that. That could work. However it still would be nice to add a WaitForParseAll method rather than keeping track of all hash keys.

Fyi. My scenario is that I exctract information from my sourcefiles using the ProjectResolver instance even if the files are not opened (e.g. just added to the project).


Best regards, Tobias Lingemann.

The latest build of this product (v24.1.0) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.