I am trying to compile the following test for threads. It runs as long as I don't have Thread.yield () which generates a syntax error, or Thread.sleep(1) which emits an int bytecode instead of long for the parameter.
-------
namespace Boojay.Boogie
import java.lang
class T(Thread):
loops_ as int
def constructor(loops as int):
loops_ = loops
def run():
for x in range(loops_):
print loops_
#Thread.yield() # compile fails
Thread.sleep(1) # compiles ok
class TestBoo():
def doTest():
T(3).start()
T(4).start()
T(5).start()
--------
The Thread.yield() is generating the following boojay compiler error
>boojay\src\Boojay.Boogie\TestBoo.boo(14,19): BCE0043: Unexpected token: ..
>boojay\src\Boojay.Boogie\TestBoo.boo(14,25): BCE0 043: Unexpected token: (.
>boojay\src\Boojay.Boogie\TestBoo.boo(14,26): BCE0 043: Unexpected token: ).
Any suggestions on what causes this/how to fix it. I need yield() as I use simple threading.
Thanks in advance.
James Caska