Skip to content

time: time.After(math.MaxInt64) kills all time.After() instances #4903

@gopherbot

Description

@gopherbot

by alec@swapoff.org:

Running this on go tip produces no output.

I realise putting MaxInt64 into time.After is not exactly expected usage, but it
happened and I thought I'd report it.

What steps will reproduce the problem?

http://play.golang.org/p/k2uA7Xo22u

What is the expected output?

I would expect the second goroutine to print a "." every second.

What do you see instead?

Nothing. Both selects block.

Which operating system are you using?

Darwin cavern.local 12.2.1 Darwin Kernel Version 12.2.1: Thu Oct 18 12:13:47 PDT 2012;
root:xnu-2050.20.9~1/RELEASE_X86_64 x86_64

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

go version default darwin/amd64
33d3e7bbd3ef tip

Please provide any additional information below.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions