From 06ad297a07716910814651acd60736978aa54d63 Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Wed, 2 Sep 2015 12:50:23 +1000 Subject: Add an option to let pres compiler user manage threading The presentation compiler currently demands that all interaction is performed by asynchronous submission of work items, which are queued and executed on the presentation compiler thread. This is fairly inconvenient if you are a known-single-threaded client that is trying to use the compiler from your own thread. This commit adds an option to disable "assertCorrectThread" to better support this use case. --- src/compiler/scala/tools/nsc/settings/ScalaSettings.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/compiler') diff --git a/src/compiler/scala/tools/nsc/settings/ScalaSettings.scala b/src/compiler/scala/tools/nsc/settings/ScalaSettings.scala index 0cdece59e1..ed6ae48890 100644 --- a/src/compiler/scala/tools/nsc/settings/ScalaSettings.scala +++ b/src/compiler/scala/tools/nsc/settings/ScalaSettings.scala @@ -366,8 +366,8 @@ trait ScalaSettings extends AbsScalaSettings */ val YpresentationVerbose = BooleanSetting("-Ypresentation-verbose", "Print information about presentation compiler tasks.") val YpresentationDebug = BooleanSetting("-Ypresentation-debug", "Enable debugging output for the presentation compiler.") - val YpresentationStrict = BooleanSetting("-Ypresentation-strict", "Do not report type errors in sources with syntax errors.") - + val YpresentationAnyThread = BooleanSetting("-Ypresentation-any-thread", "Allow use of the presentation compiler from any thread") + val YpresentationStrict = BooleanSetting("-Ypresentation-strict", "Do not report type errors in sources with syntax errors.") val YpresentationLog = StringSetting("-Ypresentation-log", "file", "Log presentation compiler events into file", "") val YpresentationReplay = StringSetting("-Ypresentation-replay", "file", "Replay presentation compiler events from file", "") val YpresentationDelay = IntSetting("-Ypresentation-delay", "Wait number of ms after typing before starting typechecking", 0, Some((0, 999)), str => Some(str.toInt)) -- cgit v1.2.3