You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The way the runtime server is implemented right now, we have no control over running Enso programs and execution is effectively blocking the rest of API.
Value
We can control execution better in the future (e.g. abort / restart it on-demand).
We can keep the servers active even if a long-running computation is executing.
Specification
Implement a message queue with worker threads (based on Executor.submit()). Jobs should be executed asynchronously.
Implement Context#createThread(...) that dispatches to TruffleLanguage.Env#createThread(...) instead of the standard Java thread primitives.
Refactor current handler to submit commands to the message queue.
Create a flow chart that describes the priorities and succession rules of the various incoming messages (should become part of the language docs). Messages in the handler can generate multiple jobs. In runtime docs, and these should account that concurrent modifications to the Context should not happen. (Marcin)
Determine and document the reordering rules for the generated jobs. In runtime docs.
Implement the reordering rules as specified.
Implement preemptive interruption of threads where necessary. This must use Thread.interrupt() (the java primitive).
Update the spec to reflect any protocol changes.
Acceptance Criteria & Test Cases
User code executes in threads asynchronously so as to not block or time out the language server.
The functionality is well documented and tested.
The text was updated successfully, but these errors were encountered:
Summary
The way the runtime server is implemented right now, we have no control over running Enso programs and execution is effectively blocking the rest of API.
Value
Specification
Executor.submit()
). Jobs should be executed asynchronously.Context#createThread(...)
that dispatches toTruffleLanguage.Env#createThread(...)
instead of the standard Java thread primitives.runtime
docs, and these should account that concurrent modifications to theContext
should not happen. (Marcin)runtime
docs.Thread.interrupt()
(the java primitive).Acceptance Criteria & Test Cases
The text was updated successfully, but these errors were encountered: