Skip to content
This repository was archived by the owner on Feb 4, 2022. It is now read-only.

Commit d38531d

Browse files
committed
Queue cell executions to an appropriate thread
We want to ensure only one cell executes at a time. But the worker must run in a separate dedicated thread somehow. The ThreadService now supports this via the queue(String id, Runnable code) method, so we'll use that.
1 parent ee6b82c commit d38531d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/main/java/org/scijava/jupyter/kernel/evaluator/ScijavaEvaluator.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public void evaluate(SimpleEvaluationObject seo, String code) {
126126

127127
Worker worker = new Worker(this.context, this.scriptEngines, this.scriptLanguages);
128128
worker.setup(seo, code, this.languageName);
129-
this.threadService.getExecutorService().submit(worker);
129+
this.threadService.queue(getClass().getName(), worker);
130130
}
131131

132132
@Override

0 commit comments

Comments
 (0)