• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2016-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
3  */
4 
5 @file:JvmName("SystemPropsKt")
6 @file:JvmMultifileClass
7 
8 package kotlinx.coroutines.internal
9 
10 // number of processors at startup for consistent prop initialization
11 internal val AVAILABLE_PROCESSORS = Runtime.getRuntime().availableProcessors()
12 
systemPropnull13 internal actual fun systemProp(
14     propertyName: String
15 ): String? =
16     try {
17         System.getProperty(propertyName)
18     } catch (e: SecurityException) {
19         null
20     }
21