Make a syncronous function asyncronous.