[View]  [Edit]  [Lock]  [References]  [Attachments]  [History]  [Home]  [Changes]  [Search]  [Help] 

test[m8n] 82 coroutine

| test count |
	test := Lua coroutine new: [
		count := 1243.
		[count > 1234] whileTrue: [
			Lua coroutine yield.
			count := count - 1.
			self print: 'In couroutine ' ,count
		]
	].
	self print: 'Test status=' ,test status printString.
	[test status = #dead] whileFalse: [
		test resume.
		self print: 'Outside at ' ,count
	]