mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-09-28 14:56:33 -04:00
comments
This commit is contained in:
parent
3c856282cf
commit
a944df2f9b
@ -12,6 +12,7 @@ func executeAndFulfill(f func() error, done chan<- error) {
|
|||||||
close(done)
|
close(done)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ExecuteAsync executes a function asychrously and return its result.
|
||||||
func ExecuteAsync(f func() error) <-chan error {
|
func ExecuteAsync(f func() error) <-chan error {
|
||||||
done := make(chan error, 1)
|
done := make(chan error, 1)
|
||||||
go executeAndFulfill(f, done)
|
go executeAndFulfill(f, done)
|
||||||
|
Loading…
Reference in New Issue
Block a user