Infinite Loop

How can I easily create an infinite loop? [import]uid: 7719 topic_id: 5968 reply_id: 305968[/import]

um, why would you want that? Corona will freeze until the loop completes, which would be never. I’m guessing what you actually want is to set an event listener on “enterFrame” so that the listener function will run every frame. [import]uid: 12108 topic_id: 5968 reply_id: 20486[/import]

No I am wanting to insert several hundred thousand values into a database to see if the framework/device can handle it. [import]uid: 7719 topic_id: 5968 reply_id: 20488[/import]

Well that’s not infinite now is it. I mean, I guess if you really want an infinite loop you could write

while true do  
 print("infinity here I come")  
end  

but all that would accomplish is crashing Corona. What you actually want to do is performance test a bunch of “for i = 1, 100000 do” loops with different values. [import]uid: 12108 topic_id: 5968 reply_id: 20491[/import]