Skip to content

An infinite loop without a time.Sleep will block timers in other goroutines #7190

@gopherbot

Description

@gopherbot

by arclnx:

If possible, include a link to a program on play.golang.org.
1. Create a goroutine with a timer inside a for loop
2. Create an infinite loop with for {}

What is the expected output?
The timer in the goroutine should unlock itself after the duration has passed

What do you see instead?
The timer locks forever

Which compiler are you using (5g, 6g, 8g, gccgo)?
$ go version
go version go1.1.2 linux/386

Which operating system are you using?
Linux x86_64 (Ubuntu 13.10)


I am attaching a testcase

Which version are you using?  (run 'go version')


Please provide any additional information below.

Attachments:

  1. test.go (227 bytes)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions