• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

luci / luci-go / 1151 / 1
62%
master: 62%

Build:
DEFAULT BRANCH: master
Ran 12 Nov 2016 01:33AM UTC
Files 569
Run time 25s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

12 Nov 2016 12:45AM UTC coverage: 63.427% (-0.05%) from 63.473%
1151.1

push

travis-ci

danjacques
Make mathrand consistently concurrency-safe.

A *math.Rand object is not concurrency-safe. It must be locked around in
order to safely use.

The "mathrand" abstraction layer, however, does not properly implement
this. It has:
- Context method which:
  - Returns a new instance if a *math.Rand is not explicitly set in the
    Context (concurrency-safe on virtue of new allocation).
  - Can return the Context-global instance (not safe) if one is
    installed.
- Global functions which:
  - Use math/rand's safe global methods if a *math.Rand is not installed in
    the Context.
  - Can return the Context-global instance (not safe) if one is
    installed.

We fix this by introducing a generic "Rand" interface and exposing that
to the user. Internally, the Context-global Rand instance is protected
behind a mutex.

Fixes #35.

BUG=None
TEST=None
R=iannucci@chromium.org, vadimsh@chromium.org

Review URL: https://codereview.chromium.org/2492223003 .

31700 of 49979 relevant lines covered (63.43%)

1552.07 hits per line

Source Files on job 1151.1
  • Tree
  • List 0
  • Changed 42
  • Source Changed 2
  • Coverage Changed 42
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 1151
  • Travis Job 1151.1
  • e207a9ea on github
  • Prev Job for on master (#1150.1)
  • Next Job for on master (#1152.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc