You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "Svatopluk Dedic (Jira)" <ji...@apache.org> on 2021/04/12 09:53:00 UTC

[jira] [Created] (NETBEANS-5571) Consider Mutex.EVENT implementation for LSP

Svatopluk Dedic created NETBEANS-5571:
-----------------------------------------

             Summary: 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


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-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

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