what's wrong with my lua code? -


local consumer = coroutine.create(function(i)    while true     = - 1     print('consumer: ' .. i)     coroutine.yield(i)    end end)  local producer = coroutine.create(function()    while true      = or 0      = + 1      print('producer: ' .. i)      status, value = coroutine.resume(consumer, i)      = value    end end)  coroutine.resume(producer) 

the console print

but it's wrong, right print should this: 0 1 0 1 01


Comments

Popular posts from this blog

'hasOwnProperty' in javascript -

python - ValueError: No axis named 1 for object type <class 'pandas.core.series.Series'> -

java - How to provide dependency injections in Eclipse RCP 3.x? -