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

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -