pull/432/head
Darien Raymond 2017-02-23 19:30:37 +01:00
parent 3c856282cf
commit a944df2f9b
1 changed files with 1 additions and 0 deletions

View File

@ -12,6 +12,7 @@ func executeAndFulfill(f func() error, done chan<- error) {
close(done)
}
// ExecuteAsync executes a function asychrously and return its result.
func ExecuteAsync(f func() error) <-chan error {
done := make(chan error, 1)
go executeAndFulfill(f, done)