[ 
https://issues.apache.org/jira/browse/NETBEANS-5571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17319192#comment-17319192
 ] 

Svatopluk Dedic commented on NETBEANS-5571:
-------------------------------------------

// cc: [~jtulach]

> Consider Mutex.EVENT implementation for LSP
> -------------------------------------------
>
>                 Key: NETBEANS-5571
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-5571
>             Project: NetBeans
>          Issue Type: Improvement
>          Components: lsp
>    Affects Versions: 12.4
>            Reporter: Svatopluk Dedic
>            Priority: Major
>             Fix For: Next
>
>
> In a sense, the thread which receives / sends LSP events is the "UI dispatch 
> thread" - similar to Swing EDT, it cannot be blocked (for long) and 
> definitely it cannot be blocked waiting for "user input", since there would 
> be noone who would deliver the user input.
> NetBeans already have safeguards against this, but they use either 
> *SwingUtilities* (which should be changed to Mutex.EVENT), or the 
> *Mutex.EVENT* - but that one lacks a special impl for LSP server environment.
> In addition, it might be desirable to extend the API with something similar 
> to *EventQueue.createSecondaryLoop*, that would allow any thread to wait for 
> the 'nested' interaction to finish. Unlike createSecondaryLoop, the API 
> should use *CompletionStage* so that if the LSP communication thread is the 
> one that shoudl wait, it would terminate the current action, and complete the 
> Stage after it receives an appropriate event.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to