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

godfat / rest-core / 461 / 5

Build:
DEFAULT BRANCH: master
Ran 21 Jul 2015 09:03PM UTC
Files 44
Run time 4s
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

21 Jul 2015 09:00PM UTC coverage: 92.287% (+0.6%) from 91.697%
jruby

push

travis-ci

godfat
fix a race condition. detail:

i failed to reproduce this in a smaller case, therefore cannot
write a test for this :( but here's the reproducing code
i am using. just in case i forgot what's the issue.

    RC::Github.pool_size = 5
    g = RC::Github.new
    g.me['html_url']
    u.auth.update_for_github(g)

first, at `me` it would create a worker, printing:

    "signal"
    "waiting = 0"

then the task is done. next, it would enqueue two tasks
at the same time, before it could grab any task:

    "signal"
    "waiting = 1"
    "signal"
    "waiting = 1"

then the worker successfully grabbed a task:

    "grab"

since it would only spawn a new worker when waiting=0,
there would be only one worker doing the job. at the
moment, there's one task in the queue, and one worker
working.

before the task is done, the request is done, and then
a subsequent request would be firing, triggering:

    "signal"
    "waiting = 0"

because there's no waiting workers, a new worker would
be spawned. so now we've two tasks in the queue,
with two workers, one is still working, the other newly
created one would just get a task from the queue.

then we have two workers working, one task in the queue.

next, one of the workers would be done. it got stuck
at this point.

i think i can't fully explain what's going on here...
but another clue is that, suppose then i do this:

    g.me

that is enqueuing another task, then, all tasks could be
done quickly. so the reason should be that all of the
workers are waiting for a task, but none of them are
signalled, while we do still have a task in the queue.

it's really late here. i'll think about this tomorrow.

1041 of 1128 relevant lines covered (92.29%)

12.3 hits per line

Source Files on job 461.5 (jruby)
  • Tree
  • List 0
  • Changed 10
  • Source Changed 1
  • Coverage Changed 10
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 461
  • Travis Job 461.5
  • 374e8908 on github
  • Prev Job for jruby on master (#460.5)
  • Next Job for jruby on master (#462.5)
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