Basic threads

BlitzMax Forums/BlitzMax Beginners Area/Basic threads

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Is the following code correctly threading. I would have liked to call the threads with an integer but I had to make a type instead.
Is there anyway I could have just supplied an integer?

SuperStrict

Type times
	Field i:Int
End Type

Function do_some_loops:Object( i:Object )

	Local j:Int

	For j=1 To times(i).i
	Next


End Function





Local s:times = New times
	s.i = 100000000
Local t:times = New times
	t.i = 100000000


Delay(2000)



Local time:Int = MilliSecs()

Local Thread1:Int = CreateThread(do_some_loops,s:times)
Local Thread2:Int = CreateThread(do_some_loops,t:times)

WaitThread( Thread1 )
WaitThread( Thread2 )

time=MilliSecs()-time


Print time

WaitKey()
End