Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is NSXMLParser's parse method asynchronous

Is NSXMLParser's parse method asynchronous?

in other words if i have an NSXMLParse object and I call [someParseObject parse] from the main thread, will it block the main thread while it does its thing?

like image 852
user160917 Avatar asked May 19 '10 04:05

user160917


2 Answers

It is not asynchronous so it will block the main thread.

like image 74
Mike Weller Avatar answered Oct 11 '22 22:10

Mike Weller


NSXMLParser can parse URL/Data, If we parse URL directly, it will freeze the UI(Main Thread),instead of that you can use Data Parsing by using NSXMLParser.Please go through NSURLConnection API for asynchronous fetching the data.

like image 39
Srinivas G Avatar answered Oct 11 '22 22:10

Srinivas G