diff options
author | Martin Odersky <odersky@gmail.com> | 2015-07-01 15:59:33 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2015-07-06 17:46:45 +0200 |
commit | 84ad34ad7a50a7f9d39d6958a7b8840e16c37a3c (patch) | |
tree | 309525b19d9f063a384d4e2561f0b29a34986c43 /src/dotty/tools/dotc/config/Properties.scala | |
parent | 64f65182f6e4f80b03d45923e02441dafe0755b4 (diff) | |
download | dotty-84ad34ad7a50a7f9d39d6958a7b8840e16c37a3c.tar.gz dotty-84ad34ad7a50a7f9d39d6958a7b8840e16c37a3c.tar.bz2 dotty-84ad34ad7a50a7f9d39d6958a7b8840e16c37a3c.zip |
Add @sharable annotation
Add @sharable annotation for classes and vals that are presumed
to be safely sharable between threads.
Also: Document CtxLazy.
Diffstat (limited to 'src/dotty/tools/dotc/config/Properties.scala')
-rw-r--r-- | src/dotty/tools/dotc/config/Properties.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/config/Properties.scala b/src/dotty/tools/dotc/config/Properties.scala index d592a7bb1..ec1f24d06 100644 --- a/src/dotty/tools/dotc/config/Properties.scala +++ b/src/dotty/tools/dotc/config/Properties.scala @@ -12,7 +12,7 @@ object Properties extends PropertiesTrait { /** Scala manifest attributes. */ - val ScalaCompilerVersion = new AttributeName("Scala-Compiler-Version") + @sharable val ScalaCompilerVersion = new AttributeName("Scala-Compiler-Version") } trait PropertiesTrait { @@ -23,7 +23,7 @@ trait PropertiesTrait { protected val propFilename = "/" + propCategory + ".properties" /** The loaded properties */ - protected lazy val scalaProps: java.util.Properties = { + @sharable protected lazy val scalaProps: java.util.Properties = { val props = new java.util.Properties val stream = pickJarBasedOn getResourceAsStream propFilename if (stream ne null) |