Thread
Overview
Island Thread class, used to run code in parallel
Location
- Reference: Island.fx
- Namespace: RemObjects.Elements.System
- Platforms: Android, Fuchsia, iOS, iOS Simulator, Mac Catalyst, macOS, tvOS, tvOS Simulator, Ubuntu, visionOS, visionOS Simulator, watchOS, watchOS Simulator, Windows
constructor (declared in Object)
constructor (ParameterizedThreadStart)
Constructor for thread
constructor(aCallback: ParameterizedThreadStart)
Thread(ParameterizedThreadStart aCallback)
init(_ aCallback: ParameterizedThreadStart)
Thread(ParameterizedThreadStart aCallback)
Sub New(aCallback As ParameterizedThreadStart)
Parameters:
- aCallback: The callback to call when this thread runs
constructor (String, ParameterizedThreadStart)
constructor(aInitialName: String; aCallback: ParameterizedThreadStart)
Thread(String aInitialName, ParameterizedThreadStart aCallback)
init(_ aInitialName: String, _ aCallback: ParameterizedThreadStart)
Thread(String aInitialName, ParameterizedThreadStart aCallback)
Sub New(aInitialName As String, aCallback As ParameterizedThreadStart)
Parameters:
- aInitialName:
- aCallback:
Abort
CallStack
Exception info when the thread fails.
property CallStack: String read;
String CallStack { get; }
var CallStack: String { get{} }
String CallStack { __get; }
ReadOnly Property CallStack() As String
CurrentThreadID
Returns the current thread id.
class property CurrentThreadID: ThreadID read;
class ThreadID CurrentThreadID { get; }
static var CurrentThreadID: ThreadID { get{} }
class ThreadID CurrentThreadID { __get; }
Shared ReadOnly Property CurrentThreadID() As ThreadID
Equals virtual (declared in Object)
Default constructor.
method Equals(aOther: Object): Boolean
Boolean Equals(Object aOther)
func Equals(_ aOther: Object) -> Boolean
Boolean Equals(Object aOther)
Function Equals(aOther As Object) As Boolean
Parameters:
- aOther: the reference to compare this with.
Finalize protected virtual (declared in Object)
method Finalize
void Finalize()
func Finalize()
void Finalize()
Sub Finalize()
GetHashCode virtual (declared in Object)
Returns a hashcode for this object. Overriden implementations should make sure that the number returned here is constant given the same object.
method GetHashCode: Int32
Int32 GetHashCode()
func GetHashCode() -> Int32
Int32 GetHashCode()
Function GetHashCode() As Int32
GetType (declared in Object)
Returns the actual type of this class
method GetType: Type
Type GetType()
func GetType() -> Type
Type GetType()
Function GetType() As Type
IsAlive
If true this thread is still running.
property IsAlive: Boolean read;
Boolean IsAlive { get; }
var IsAlive: Boolean { get{} }
Boolean IsAlive { __get; }
ReadOnly Property IsAlive() As Boolean
Name iOS, iOS Simulator, Mac Catalyst, macOS, tvOS, tvOS Simulator, visionOS, visionOS Simulator, watchOS, watchOS Simulator
property Name: String read;
String Name { get; }
var Name: String { get{} }
String Name { __get; }
ReadOnly Property Name() As String
Name Android, Fuchsia, Ubuntu, Windows
gets/sets the name of this thread.
property Name: String read write;
String Name { get; set; }
var Name: String { get{} set{} }
String Name { __get; __set; }
Property Name() As String
Priority
Set the thread's priority; note that on Posix this requires root for higher than normal priority.
property Priority: ThreadPriority read write;
ThreadPriority Priority { get; set; }
var Priority: ThreadPriority { get{} set{} }
ThreadPriority Priority { __get; __set; }
Property Priority() As ThreadPriority
ReferenceEquals (declared in Object)
Compares two references for equivalence (even if they have an equals operator)
class method ReferenceEquals(a: Object; b: Object): Boolean
static Boolean ReferenceEquals(Object a, Object b)
static func ReferenceEquals(_ a: Object, _ b: Object) -> Boolean
static Boolean ReferenceEquals(Object a, Object b)
Shared Function ReferenceEquals(a As Object, b As Object) As Boolean
Parameters:
- a: left value
- b: right value
Sleep
Pause the current thread for a given amount of msec.
class method Sleep(aTimeout: Int32)
static void Sleep(Int32 aTimeout)
static func Sleep(_ aTimeout: Int32)
static void Sleep(Int32 aTimeout)
Shared Sub Sleep(aTimeout As Int32)
Parameters:
- aTimeout: Time to wait in msec.
Start
Starts the thread; passing parameter to the callback.
method Start(parameter: Object := nil)
void Start(Object parameter = null)
func Start(_ parameter: Object = nil)
void Start(Object parameter)
Sub Start(parameter As Object = Null)
Parameters:
- parameter: The parameter to pass to the callback
ThreadID
property ThreadID: ThreadID read;
ThreadID ThreadID { get; }
var ThreadID: ThreadID { get{} }
ThreadID ThreadID { __get; }
ReadOnly Property ThreadID() As ThreadID
ToString virtual (declared in Object)
Gets the string representation of this method.
method ToString: String
String ToString()
func ToString() -> String
String ToString()
Function ToString() As String
Yield
Yield executing till the next cycle this thread gets.
CallStack
Exception info when the thread fails.
property CallStack: String read;
String CallStack { get; }
var CallStack: String { get{} }
String CallStack { __get; }
ReadOnly Property CallStack() As String
IsAlive
If true this thread is still running.
property IsAlive: Boolean read;
Boolean IsAlive { get; }
var IsAlive: Boolean { get{} }
Boolean IsAlive { __get; }
ReadOnly Property IsAlive() As Boolean
Name iOS, iOS Simulator, Mac Catalyst, macOS, tvOS, tvOS Simulator, visionOS, visionOS Simulator, watchOS, watchOS Simulator
property Name: String read;
String Name { get; }
var Name: String { get{} }
String Name { __get; }
ReadOnly Property Name() As String
Name Android, Fuchsia, Ubuntu, Windows
gets/sets the name of this thread.
property Name: String read write;
String Name { get; set; }
var Name: String { get{} set{} }
String Name { __get; __set; }
Property Name() As String
Priority
Set the thread's priority; note that on Posix this requires root for higher than normal priority.
property Priority: ThreadPriority read write;
ThreadPriority Priority { get; set; }
var Priority: ThreadPriority { get{} set{} }
ThreadPriority Priority { __get; __set; }
Property Priority() As ThreadPriority
ThreadID
property ThreadID: ThreadID read;
ThreadID ThreadID { get; }
var ThreadID: ThreadID { get{} }
ThreadID ThreadID { __get; }
ReadOnly Property ThreadID() As ThreadID
CurrentThreadID
Returns the current thread id.
ReferenceEquals (declared in Object)
Compares two references for equivalence (even if they have an equals operator)
class method ReferenceEquals(a: Object; b: Object): Boolean
static Boolean ReferenceEquals(Object a, Object b)
static func ReferenceEquals(_ a: Object, _ b: Object) -> Boolean
static Boolean ReferenceEquals(Object a, Object b)
Shared Function ReferenceEquals(a As Object, b As Object) As Boolean
Parameters:
- a: left value
- b: right value
Sleep
Pause the current thread for a given amount of msec.
class method Sleep(aTimeout: Int32)
static void Sleep(Int32 aTimeout)
static func Sleep(_ aTimeout: Int32)
static void Sleep(Int32 aTimeout)
Shared Sub Sleep(aTimeout As Int32)
Parameters:
- aTimeout: Time to wait in msec.
Yield
Yield executing till the next cycle this thread gets.
constructor (declared in Object)
constructor (ParameterizedThreadStart)
Constructor for thread
constructor(aCallback: ParameterizedThreadStart)
Thread(ParameterizedThreadStart aCallback)
init(_ aCallback: ParameterizedThreadStart)
Thread(ParameterizedThreadStart aCallback)
Sub New(aCallback As ParameterizedThreadStart)
Parameters:
- aCallback: The callback to call when this thread runs
constructor (String, ParameterizedThreadStart)
constructor(aInitialName: String; aCallback: ParameterizedThreadStart)
Thread(String aInitialName, ParameterizedThreadStart aCallback)
init(_ aInitialName: String, _ aCallback: ParameterizedThreadStart)
Thread(String aInitialName, ParameterizedThreadStart aCallback)
Sub New(aInitialName As String, aCallback As ParameterizedThreadStart)
Parameters:
- aInitialName:
- aCallback:
Abort
Equals virtual (declared in Object)
Default constructor.
method Equals(aOther: Object): Boolean
Boolean Equals(Object aOther)
func Equals(_ aOther: Object) -> Boolean
Boolean Equals(Object aOther)
Function Equals(aOther As Object) As Boolean
Parameters:
- aOther: the reference to compare this with.
Finalize protected virtual (declared in Object)
method Finalize
void Finalize()
func Finalize()
void Finalize()
Sub Finalize()
GetHashCode virtual (declared in Object)
Returns a hashcode for this object. Overriden implementations should make sure that the number returned here is constant given the same object.
method GetHashCode: Int32
Int32 GetHashCode()
func GetHashCode() -> Int32
Int32 GetHashCode()
Function GetHashCode() As Int32
GetType (declared in Object)
Returns the actual type of this class
method GetType: Type
Type GetType()
func GetType() -> Type
Type GetType()
Function GetType() As Type
Start
Starts the thread; passing parameter to the callback.
method Start(parameter: Object := nil)
void Start(Object parameter = null)
func Start(_ parameter: Object = nil)
void Start(Object parameter)
Sub Start(parameter As Object = Null)
Parameters:
- parameter: The parameter to pass to the callback
ToString virtual (declared in Object)
Gets the string representation of this method.