An object describing configuration of the Scala Native semantics.
- Companion:
- object
Value members
Abstract methods
Controls behaviour of final fields and their complaince with the Java Memory Model. The outputs of the program would depend of compliance level:
Controls behaviour of final fields and their complaince with the Java Memory Model. The outputs of the program would depend of compliance level:
- JVMMemoryModelCompliance.Strict all final fields are synchronized - ensures safe publication,but it might lead to runtime performance overhead.
- JVMMemoryModelCompliance.None final fields are never synchronized - no runtime overhead when accessing final fields, but it might lead to unexpected state in highly concurrent programs.
- JVMMemoryModelCompliance.Relaxed (default) only fields marked with scala.scalanative.annotation.safePublish are synchronized.
Controls behaviour of calls to extern methods when executing in multithreading mode.
When executing extern functions Garbage Collector needs to be notified about the internal state of thread, it's required to correctly track reachable objects and skip waiting for threads executing unmanged code.
When disabled (default) only calls to methods annotated with scala.scalanative.unsafe.blocking
would notify the GC - it allows to reduce overhead of extern method calls, but might lead to deadlocks or longer GC pauses when waiting for unannotated blocking function call.
When enabled every invocation of foreign function would notify the GC about the thread state which guarantess no deadlocks introduced by waiting for threads executing foreign code, but might reduce overall performance.
Controls behaviour of calls to extern methods when executing in multithreading mode.
When executing extern functions Garbage Collector needs to be notified about the internal state of thread, it's required to correctly track reachable objects and skip waiting for threads executing unmanged code.
When disabled (default) only calls to methods annotated with scala.scalanative.unsafe.blocking
would notify the GC - it allows to reduce overhead of extern method calls, but might lead to deadlocks or longer GC pauses when waiting for unannotated blocking function call.
When enabled every invocation of foreign function would notify the GC about the thread state which guarantess no deadlocks introduced by waiting for threads executing foreign code, but might reduce overall performance.
Sets the behaviour of final fields and their complaince with the Java Memory Model The outputs of the program would depend of compliance level:
Sets the behaviour of final fields and their complaince with the Java Memory Model The outputs of the program would depend of compliance level:
- JVMMemoryModelCompliance.Strict all final fields are synchronized - ensures safe publication,but it might lead to runtime performance overhead.
- JVMMemoryModelCompliance.None final fields are never synchronized - no runtime overhead when accessing final fields, but it might lead to unexpected state in highly concurrent programs.
- JVMMemoryModelCompliance.Relaxed (default) only fields marked with scala.scalanative.annotation.safePublish are synchronized.
Sets behaviour of calls to extern methods when executing in multithreading mode.
When executing extern functions Garbage Collector needs to be notified about the internal state of thread, it's required to correctly track reachable objects and skip waiting for threads executing unmanged code.
When disabled only calls to methods annotated with scala.scalanative.unsafe.blocking
would notify the GC - it allows to reduce overhead of extern method calls, but might lead to deadlocks or longer GC pauses when waiting for unannotated blocking function call.
When enabled every invocation of foreign function would notify the GC about the thread state which guarantess no deadlocks introduced by waiting for threads executing foreign code, but might reduce overall performance.
Sets behaviour of calls to extern methods when executing in multithreading mode.
When executing extern functions Garbage Collector needs to be notified about the internal state of thread, it's required to correctly track reachable objects and skip waiting for threads executing unmanged code.
When disabled only calls to methods annotated with scala.scalanative.unsafe.blocking
would notify the GC - it allows to reduce overhead of extern method calls, but might lead to deadlocks or longer GC pauses when waiting for unannotated blocking function call.
When enabled every invocation of foreign function would notify the GC about the thread state which guarantess no deadlocks introduced by waiting for threads executing foreign code, but might reduce overall performance.