Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]

structure of a program that loads things from the web
Started by ehsmeng Jun 13 2010 07:17 PM

- - - - -
1 reply to this topic
This topic has been archived. This means that you cannot reply to this topic.
[TOPIC: post.html]


[GLOBAL: userInfoPane.html]
  • Observer

  • 11 posts
  • Guests

Hi all,

I asked if there's a way to run http.request asynchronously, possibly wrapped in a coroutine but got no answer. I therefore guess you use enter frame-event to keep up with the GUI and something else for the other stuff.

Say that you want to implement the youtube app in iPhone (we've all used that one). You search for clips, and you render the set in a list. The part of the list which shows has its icons loaded.

How would you structure a program like this? The code in the event enter frame event loop takes care of where you've scrolled to and all that, but how do we tell another "thread" to do the work so the enter frame event is not blocked? A new coroutine per icon load? Some thread pool pattern?

uid: 4441 topic_id: 1181 reply_id: 301181

[TOPIC: post.html]


[GLOBAL: userInfoPane.html]
  • Contributor

  • 248 posts
  • Corona SDK


Asynchronous http request is not available yet in Corona (although they are in Lua). It is one of the features they plan to enable in the future releases (I am looking for it too).
uid: 4883 topic_id: 1181 reply_id: 3175