Thread

Overview

Island Thread class, used to run code in parallel

Location

  • Reference: Island.fx
  • Namespace: RemObjects.Elements.System
  • Platforms: Android, iOS, iOS Simulator, Mac Catalyst, macOS, tvOS, tvOS Simulator, Ubuntu, watchOS, watchOS Simulator, Windows

 

constructor    (declared in Object)

 

constructor

 

Thread()

 

init()

 

Thread()

 

Sub New()

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

Abort

 

method Abort

 

void Abort()

 

func Abort()

 

void Abort()

 

Sub 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: NativeUInt read;

 

class NativeUInt CurrentThreadID { get; }

 

static var CurrentThreadID: NativeUInt { get{} }

 

class NativeUInt CurrentThreadID { __get; }

 

Shared ReadOnly Property CurrentThreadID() As NativeUInt

Equals  virtual    (declared in Object)

 

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:

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

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)

 

void Start(Object parameter)

 

func Start(_ parameter: Object)

 

void Start(Object parameter)

 

Sub Start(parameter As Object)

Parameters:

  • parameter: The parameter to pass to the callback

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.

 

class method Yield: Boolean

 

static Boolean Yield()

 

static func Yield() -> Boolean

 

static Boolean Yield()

 

Shared Function Yield() As Boolean

 

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

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

CurrentThreadID

Returns the current thread id.

 

class property CurrentThreadID: NativeUInt read;

 

class NativeUInt CurrentThreadID { get; }

 

static var CurrentThreadID: NativeUInt { get{} }

 

class NativeUInt CurrentThreadID { __get; }

 

Shared ReadOnly Property CurrentThreadID() As NativeUInt

 

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.

 

class method Yield: Boolean

 

static Boolean Yield()

 

static func Yield() -> Boolean

 

static Boolean Yield()

 

Shared Function Yield() As Boolean

 

constructor    (declared in Object)

 

constructor

 

Thread()

 

init()

 

Thread()

 

Sub New()

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

Abort

 

method Abort

 

void Abort()

 

func Abort()

 

void Abort()

 

Sub Abort()

Equals  virtual    (declared in Object)

 

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:

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)

 

void Start(Object parameter)

 

func Start(_ parameter: Object)

 

void Start(Object parameter)

 

Sub Start(parameter As Object)

Parameters:

  • parameter: The parameter to pass to the callback

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