mirror of https://github.com/v2ray/v2ray-core
comments
parent
3c856282cf
commit
a944df2f9b
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue