Platform

object Platform
class Object
trait Matchable
class Any

Value members

Inherited methods

final def addShutdownHook(action: () => Unit)(implicit unsafe: Unsafe): Unit

Adds a shutdown hook that executes the specified action on shutdown.

Adds a shutdown hook that executes the specified action on shutdown.

Inherited from:
PlatformSpecific
final def addSignalHandler(signal: String, action: () => Unit)(implicit unsafe: Unsafe): Unit

Adds a signal handler for the specified signal (e.g. "INFO"). This method never fails even if adding the handler fails.

Adds a signal handler for the specified signal (e.g. "INFO"). This method never fails even if adding the handler fails.

On Scala.js, signal handlers are triggered by changing the hash of the URL to include "zio-signal=INFO" (for the "INFO" signal).

Inherited from:
PlatformSpecific
final def exit(code: Int)(implicit unsafe: Unsafe): Unit

Exits the application with the specified exit code.

Exits the application with the specified exit code.

Inherited from:
PlatformSpecific
final def getCurrentThreadGroup()(implicit unsafe: Unsafe): String

Returns the name of the thread group to which this thread belongs. This is a side-effecting method.

Returns the name of the thread group to which this thread belongs. This is a side-effecting method.

Inherited from:
PlatformSpecific
final def newConcurrentSet[A]()(implicit unsafe: Unsafe): Set[A]
Inherited from:
PlatformSpecific
final def newConcurrentWeakSet[A]()(implicit unsafe: Unsafe): Set[A]
Inherited from:
PlatformSpecific
final def newWeakHashMap[A, B]()(implicit unsafe: Unsafe): Map[A, B]
Inherited from:
PlatformSpecific
final def newWeakReference[A](value: A)(implicit unsafe: Unsafe): () => A
Inherited from:
PlatformSpecific
final def newWeakSet[A]()(implicit unsafe: Unsafe): Set[A]
Inherited from:
PlatformSpecific

Inherited fields

final val isJS: true

Returns whether the current platform is ScalaJS.

Returns whether the current platform is ScalaJS.

Inherited from:
PlatformSpecific
final val isJVM: false

Returns whether the currently platform is the JVM.

Returns whether the currently platform is the JVM.

Inherited from:
PlatformSpecific
final val isNative: false

Returns whether the currently platform is Scala Native.

Returns whether the currently platform is Scala Native.

Inherited from:
PlatformSpecific