Method runs async but still blocks touch event

I'm trying to load data with HttpWebResponse asynchronously.
The preloader spins without blocking but when I try to touch the back button (iOS navigation controller back button to previous controller), it doesn't respond until the data is loaded.

public async Task LoadDocuments (Action callback)
{
    //...
    HttpWebResponse response = await conn.Get (url);
    //...
}

public void UpdateData ()
{
    Console.WriteLine ("Before load");
    LoadDocuments (DataLoaded);
    Console.WriteLine ("After load");
}

The "After load" is printed immediately after the "Before load" as supposed.

Sign In or Register to comment.