mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-28 14:15:06 +03:00
(broken state) WIP rewriting core to use ironwood
This commit is contained in:
parent
ace7b43b6d
commit
f1c37f8440
24 changed files with 162 additions and 4723 deletions
|
@ -46,7 +46,7 @@ func TimerStop(t *time.Timer) bool {
|
|||
|
||||
// FuncTimeout runs the provided function in a separate goroutine, and returns true if the function finishes executing before the timeout passes, or false if the timeout passes.
|
||||
// It includes no mechanism to stop the function if the timeout fires, so the user is expected to do so on their own (such as with a Cancellation or a context).
|
||||
func FuncTimeout(f func(), timeout time.Duration) bool {
|
||||
func FuncTimeout(timeout time.Duration, f func()) bool {
|
||||
success := make(chan struct{})
|
||||
go func() {
|
||||
defer close(success)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue