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

godfat / rest-core / 461

Build:
DEFAULT BRANCH: master
Ran 21 Jul 2015 09:00PM UTC
Jobs 3
Files 45
Run time 3min
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
461

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.

1601 of 1742 relevant lines covered (91.91%)

48.03 hits per line

Jobs
ID Job ID Ran Files Coverage
2 461.2 (2.1) 21 Jul 2015 09:00PM UTC 0
91.91
Travis Job 461.2
4 461.4 (rbx-2) 21 Jul 2015 09:03PM UTC 0
95.15
Travis Job 461.4
5 461.5 (jruby) 21 Jul 2015 09:03PM UTC 0
92.29
Travis Job 461.5
Source Files on build 461
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #461
  • 374e8908 on github
  • Prev Build on master (#460)
  • Next Build on master (#462)
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