I do that. Works fine for me. On Tue, Apr 3, 2012 at 17:44, MojoDK <[email protected]> wrote: > Hi, > > I have this code: > > string url="bla"; > ThreadPool.QueueUserWorkItem (delegate { > try { > WebClient client = new WebClient(); > string html = client.DownloadString(url); > client.Dispose(); > client = null; > // Do something with the result. > } catch (WebException e) {} > }); > > ... but it seams to slow/block the main UI anyway somehow. > > What is best practice in Monotouch to fetch a webpage HTML without blocking > the UI? I need to fetch like 60 webpages (actually it's JSON results) as > fast as possible and today I spin up 2 threads at a time. > > Can we do parallel in Monotouch? > > Thanks > Mojo > > > -- > View this message in context: > http://monotouch.2284126.n4.nabble.com/Best-practice-Get-webpage-HTML-inside-thread-tp4529445p4529445.html > Sent from the MonoTouch mailing list archive at Nabble.com. > _______________________________________________ > MonoTouch mailing list > [email protected] > http://lists.ximian.com/mailman/listinfo/monotouch
-- Nic Wise t. +44 7788 592 806 | @fastchicken | http://www.linkedin.com/in/nicwise b. http://www.fastchicken.co.nz/ Nearest Bus: find when the next bus is coming to your stop. http://goo.gl/Vcz1p mobileAgent (for FreeAgent): get your accounts in your pocket. http://goo.gl/IuBU Trip Wallet: Keep track of your budget on the go: http://goo.gl/ePhKa London Bike App: Find the nearest Boris Bike, and get riding! http://goo.gl/Icp2 _______________________________________________ MonoTouch mailing list [email protected] http://lists.ximian.com/mailman/listinfo/monotouch
