a small refactoring of async_load
scripted update of code from master at e7eb2f9 a small refactoring of async_load