Expose Sleep and explicitly stop timer (#37)

This commit replaces timeSleeper with Sleep.

Previously, if the context finishes early, timeSleeper returns the
context's error and ignore the timer.
This is correct, but the GC will only be able to collect
the timer after the timer expires.
This commit explicitly stop the timer, so that the GC can claim it
immediately.
2 files changed
tree: b4f5ea88d962d1cf8dad8250a5351f315632f6bb
  1. .gitignore
  2. .travis.yml
  3. call_option.go
  4. call_option_test.go
  5. CONTRIBUTING.md
  6. gax.go
  7. invoke.go
  8. invoke_test.go
  9. LICENSE
  10. path_template.go
  11. path_template_parser.go
  12. path_template_test.go
  13. README.md
README.md

Google API Extensions for Go

Build Status Code Coverage

Google API Extensions for Go (gax-go) is a set of modules which aids the development of APIs for clients and servers based on gRPC and Google API conventions.

This project is currently experimental and not supported.