windowsphonehacker / SparklrWP

WIP WP client for sparklr.me
MIT License
5 stars 1 forks source link

Use async/await instead of callbacks #42

Closed ChrisK91 closed 11 years ago

ChrisK91 commented 11 years ago

I created a branch to see if I could get async and await working (see branch async-await). I used them to implement a image loading Task, and they seem to work fine. I suggest that we move from the current callback scheme into an async await pattern. async and await are easier to read, making it easier to edit code written by others. It also minimizes (or eliminates) cross thread access.

Here are some other advantages: http://stackoverflow.com/questions/7870334/await-async-vs-classic-asynchronous-callbacks

the-eater commented 11 years ago

I tried creating the await stuff but I found out that it didn't work so thats why there is an callback system go rambo on it :+1: