Hello, im a newbie with threading. I am using the ThreadingV1.10 library.
This is my code:
Debug shows c=0 ... is not possible to access a global from a new thread?
This is my code:
B4X:
Sub Process_Globals
Dim hilo1 As Thread
Dim c As Int
End Sub
Sub Activity_Create(FirstTime As Boolean)
c = 0
hilo1.Initialise("ThreadSub")
hilo1.Start(Me, "ThreadSub", Null)
Sleep(2000)
log(c)
End Sub
Sub ThreadSub
c = 1
End Sub
Debug shows c=0 ... is not possible to access a global from a new thread?