From 0fbc7f657194ff4f6eeccf4797b6dd2811a37ab9 Mon Sep 17 00:00:00 2001 From: Fedor Isakov Date: Tue, 14 Jan 2020 12:48:24 +0100 Subject: [PATCH] Ensure typechecking can't run two coderules sessions with same session data. Avoid sharing mutable state b/w two invocations of typechecking initiated from different threads (race condition). --- ...rains.mps.coderules.typechecking@tests.mps | 177 +-- ...ins.mps.coderules.typechecking.service.mps | 1062 +++++++++++------ 2 files changed, 799 insertions(+), 440 deletions(-) diff --git a/coderules/solutions/jetbrains.mps.coderules.typechecking.test/models/jetbrains.mps.coderules.typechecking@tests.mps b/coderules/solutions/jetbrains.mps.coderules.typechecking.test/models/jetbrains.mps.coderules.typechecking@tests.mps index 57355f50..243bdab8 100644 --- a/coderules/solutions/jetbrains.mps.coderules.typechecking.test/models/jetbrains.mps.coderules.typechecking@tests.mps +++ b/coderules/solutions/jetbrains.mps.coderules.typechecking.test/models/jetbrains.mps.coderules.typechecking@tests.mps @@ -580,7 +580,7 @@ - + @@ -591,93 +591,114 @@ - - - - - - - - - - - - - + + + + + + - - - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - + - - - - + + + + diff --git a/coderules/solutions/jetbrains.mps.coderules.typechecking/models/jetbrains.mps.coderules.typechecking.service.mps b/coderules/solutions/jetbrains.mps.coderules.typechecking/models/jetbrains.mps.coderules.typechecking.service.mps index 369b0255..ada55a67 100644 --- a/coderules/solutions/jetbrains.mps.coderules.typechecking/models/jetbrains.mps.coderules.typechecking.service.mps +++ b/coderules/solutions/jetbrains.mps.coderules.typechecking/models/jetbrains.mps.coderules.typechecking.service.mps @@ -6318,96 +6318,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -6549,6 +6459,152 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -6608,7 +6664,6 @@ - @@ -6624,25 +6679,78 @@ - - + + - + - - + + - - - - - + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -6650,64 +6758,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -7270,6 +7320,12 @@ + + + + + + @@ -7847,75 +7903,68 @@ - - - - - - + + - - - - - - + + + - - + + - + - - - - - - + + + + + + - + - - + + - + - - - - + + + + - + - + - - - - + + + + - + - + - + @@ -7925,40 +7974,40 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -10236,24 +10285,36 @@ - - - - + + + + - - - - + + + + - - - + + + + + + + + + + + + + + - + + - + @@ -10836,175 +10897,452 @@ - - - - + + + + - + - - - - + + + + + + + + + + - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + - + - + - - + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + + + + + + + - - - + + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - +