[Android]getaddrinfo stucks main UIthread?

Using both URLLoad.load in Haxe and HttpURLConnection.getInputStream in Java made my app stuck for a few (5 ~ 10) secs even though I had created a thread in my code.

I know DNS analysis must be done but why my main UIThread will be stucked?

This happened when I loaded a picture from a domain which I connected at the first time in app . Then the loading icon stopped spinning , == , Tween stopped too. Mouse click could be captured but no MouseEvent dispatched ( and it would be dispatch right after the DNS analysis finished and UIThread recovered???).

How can I keep my app run on smoothly while doing DNS analysis ?

Sorry for my poor English. == . Hope you guys can understand my problem and give me some replies .Thanks!

What target are you testing? What platform? What version of Lime?

target android
lime 5.2.1

I used Java to load Byte from url and created a Thread in Java to solve this problem.(Creating a thread in Haxe to call Java method was not helping==.)

But using UrlLoader.load() in Haxe does stuck my app because of DNS analysis (the getaddrinfo method).I’m not sure if my code has something wrong .

We perform URL loading using curl in a background thread. Perhaps it’s something in how cURL is built? It isn’t supposed to block the main thread, since it should be in a Haxe background thread