Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-5571

Consider Mutex.EVENT implementation for LSP

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 12.4
    • Next
    • lsp

    Description

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            sdedic Svatopluk Dedic
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: