|
From: Daniel A. <mr....@gm...> - 2009-07-28 22:59:13
|
I'm having lockups when I try to pull an http page using wxURL. It gets stuck at GetInputStream but then appears to work fine after right clicking on the systray icon... I believe it may be the threads issues that are described on this page: http://wiki.wxwidgets.org/WxURL quote: "Under Windows, wxURL and wxThread may have problems to work well together. Be sure to construct the wxURL and call wxURL::GetInputStream inside the main thread." function get_games() local url = wx.wxURL("http://fly.thruhere.net/status/games.json") local stream = url:GetInputStream() -- freezes here -- frees up if you right click on the systray icon local size = stream:GetSize() local data = stream:Read(size) return data end |