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

luci / luci-go / 1151
62%

Build:
DEFAULT BRANCH: master
Ran 12 Nov 2016 01:33AM UTC
Jobs 1
Files 569
Run time 28s
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

pending completion
1151

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

Jobs
ID Job ID Ran Files Coverage
1 1151.1 12 Nov 2016 01:33AM UTC 0
63.43
Travis Job 1151.1
Source Files on build 1151
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #1151
  • e207a9ea on github
  • Prev Build on master (#1150)
  • Next Build on master (#1152)
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