Files @ r14248:a9050881acd7
Branch filter:

Location: cpp/openttd-patchpack/source/src/3rdparty/squirrel/samples/tailstate.nut - annotation

rubidium
(svn r18809) -Codechange/Cleanup: remove unneeded headers from some files, if a header require a header make it include that header
function state1()
{
	::suspend("state1");
	return state2();
}

function state2()
{
	::suspend("state2");
	return state3();
}

function state3()
{
	::suspend("state3");
	return state1();
}

local statethread = ::newthread(state1)

::print(statethread.call()+"\n");

for(local i = 0; i < 10000; i++)
	::print(statethread.wakeup()+"\n");