Initial data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 72d218235f
commit f23f22d71c
199087 changed files with 3378941 additions and 0 deletions

23
Task/Events/Go/events.go Normal file
View file

@ -0,0 +1,23 @@
package main
import (
"log"
"os"
"time"
)
func main() {
l := log.New(os.Stdout, "", log.Ltime | log.Lmicroseconds)
l.Println("program start")
event := make(chan int)
go func() {
l.Println("task start")
<-event
l.Println("event reset by task")
}()
l.Println("program sleeping")
time.Sleep(1 * time.Second)
l.Println("program signaling event")
event <- 0
time.Sleep(100 * time.Millisecond)
}