enso/engine
Hubert Plociniczak 27feaf6bc5
Eliminate deadlock scenario during file edit/open/close requests (#6920)
At the beginning of the execution `EnsureCompiledJob` acquired write compilation lock. When compiling individual modules it would then
- acquire file lock
- acquire read compilation lock

The second one was spurious since it already kept the write lock. This sequence meant however that `CloseFileCmd` or `OpenFileCmd` can lead to  a deadlock when requests come in close succession. This is because commands:
- acquire file lock
- acquire read compilation lock

So `EnsureCompiledJob` might have the (write) compilation lock but the commands could have file lock. And the second required lock for either the job or the command could never be acquired.

Flipping the order did the trick.

Partially solves #6841.

# Important Notes
For some reason we don't get updates for the newly added node, as illustrated in the screenshot, but that could be related to the close/open action. Will need to dig more.

![Screenshot from 2023-06-01 16-45-17](https://github.com/enso-org/enso/assets/292128/900aa9b3-b2b2-4e4d-93c8-267f92b79352)
2023-06-06 08:05:24 +00:00
..
interpreter-dsl-test/src/test/java/org/enso/interpreter/dsl/test Introducing @BuiltinMethod.needsFrame and InlineableNode (#6442) 2023-04-28 15:32:13 +00:00
language-server Suggestion should contain a list of annotations (#6924) 2023-06-02 07:26:01 +00:00
launcher/src Don't log installed engines and runtimes in prod (#5900) 2023-03-16 10:36:55 +00:00
polyglot-api/src Suggestion should contain a list of annotations (#6924) 2023-06-02 07:26:01 +00:00
runner Limit the number of reported warnings (#6577) 2023-05-10 11:48:31 +00:00
runtime Eliminate deadlock scenario during file edit/open/close requests (#6920) 2023-06-06 08:05:24 +00:00
runtime-instrument-id-execution/src/main/java/org/enso/interpreter/instrument Consistent self types (#6867) 2023-05-31 15:47:48 +00:00
runtime-instrument-repl-debugger/src/main/java/org/enso/interpreter/instrument Improve undefined method error message on builtin types (#3907) 2022-11-30 13:37:17 +01:00
runtime-instrument-runtime-server/src/main/java/org/enso/interpreter/instrument Register instruments/language in their own compilation units to fix the sbt build issues (#3509) 2022-06-13 14:09:08 +00:00
runtime-language-epb/src/main/java/org/enso/interpreter/epb Schedule initialization of JS context in a separate thread (#5680) 2023-02-17 15:54:36 +00:00
runtime-with-instruments/src/test Suggestion should contain a list of annotations (#6924) 2023-06-02 07:26:01 +00:00
runtime-with-polyglot/src/test Consistent self types (#6867) 2023-05-31 15:47:48 +00:00
README.md Add a markdown style guide (#1022) 2020-07-21 13:59:40 +01:00

The Enso Engine

The Enso engine is the codebase responsible for compiling and executing Enso code, as well as providing language server functionality to users of the language. It is subdivided into two major components:

  • Language Server: The Enso language service.
  • Polyglot API: The truffle-boundary safe API for communication between the language server and the runtime.
  • Runner: The command-line interface for Enso.
  • Runtime: The compiler and interpreter for Enso.