mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-07 23:13:11 -06:00
bimg is MIT licensed. It depends on the C library libvips which is LGPL v2.1+ licensed. libvips must be installed separately.
26 lines
415 B
Go
26 lines
415 B
Go
package main
|
|
|
|
import . "github.com/visionmedia/go-debug"
|
|
import "time"
|
|
|
|
var a = Debug("multiple:a")
|
|
var b = Debug("multiple:b")
|
|
var c = Debug("multiple:c")
|
|
|
|
func work(debug DebugFunction, delay time.Duration) {
|
|
for {
|
|
debug("doing stuff")
|
|
time.Sleep(delay)
|
|
}
|
|
}
|
|
|
|
func main() {
|
|
q := make(chan bool)
|
|
|
|
go work(a, 1000*time.Millisecond)
|
|
go work(b, 250*time.Millisecond)
|
|
go work(c, 100*time.Millisecond)
|
|
|
|
<-q
|
|
}
|