Hi all!
I have a “for” that cycles around 1000 times.
Inside the “for” I perform http.request and I immediately verify what I have downloaded (that’s why I am using http.request instead of network.download).
Well… The http request FREEZES the whole interface emulator.
The code looks like this:
function Process()
local path = system.pathForFile(“mylist.txt”, system.TemporaryDirectory)
local file = io.open(path, “r”)
if file then
for line in file:lines() do
http.request {url = myURL, sink = ltn12.sink.file(“myobject.txt”),}
Verify(“myobject.txt”)
end
end
end
Verify doesn’t do anything special at the moment, neither complicated or cpu intensive. Am I missing something???
[import]uid: 86439 topic_id: 24756 reply_id: 324756[/import]