mirror of
https://github.com/kataras/iris.git
synced 2025-02-02 15:30:36 +01:00
more example in example
As this file is an example, it could help people to learn golang pattern. So, i've added another way to get a clock signal. I've kept the original to show people 2 different ways. Former-commit-id: d5b50c0845e93388a41863fb262b166320c2735c
This commit is contained in:
parent
3b572eb23b
commit
8d0ba9a0d0
|
@ -77,7 +77,7 @@ func main() {
|
|||
|
||||
go func() {
|
||||
i := 0
|
||||
for {
|
||||
for range time.Tick(1*time.Second){ //another way to get clock signal
|
||||
mutex.Lock()
|
||||
broadcast(Conn, fmt.Sprintf("aaaa2 %d\n", i))
|
||||
mutex.Unlock()
|
||||
|
|
Loading…
Reference in New Issue
Block a user