diff options
author | Martin Odersky <odersky@gmail.com> | 2015-10-31 09:57:50 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2015-10-31 09:57:50 +0100 |
commit | 5b2d94a274abe82d26687f1c6ef19fb1d57df2dd (patch) | |
tree | fc841753cc74d630814e10e4d8f51bc28f275f4b /src/dotty/tools/dotc/Run.scala | |
parent | ac347485e94061d548bebc794ee133bb1b248a48 (diff) | |
download | dotty-5b2d94a274abe82d26687f1c6ef19fb1d57df2dd.tar.gz dotty-5b2d94a274abe82d26687f1c6ef19fb1d57df2dd.tar.bz2 dotty-5b2d94a274abe82d26687f1c6ef19fb1d57df2dd.zip |
Check that access to context base is singlethreaded.
ContextBase is not intended to be threadsafe, We now test that
indeed it is not shared by compileUnits calls operating on
different threads.
Diffstat (limited to 'src/dotty/tools/dotc/Run.scala')
-rw-r--r-- | src/dotty/tools/dotc/Run.scala | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/Run.scala b/src/dotty/tools/dotc/Run.scala index 114f994be..ba86e3e70 100644 --- a/src/dotty/tools/dotc/Run.scala +++ b/src/dotty/tools/dotc/Run.scala @@ -50,6 +50,7 @@ class Run(comp: Compiler)(implicit ctx: Context) { } protected def compileUnits() = Stats.monitorHeartBeat { + ctx.checkSingleThreaded() val phases = ctx.squashPhases(ctx.phasePlan, ctx.settings.Yskip.value, ctx.settings.YstopBefore.value, ctx.settings.YstopAfter.value, ctx.settings.Ycheck.value) ctx.usePhases(phases) |