1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-06-26 01:15:38 +00:00
This commit is contained in:
Darien Raymond 2017-02-23 19:30:37 +01:00
parent 3c856282cf
commit a944df2f9b

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)