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

labrad / pylabrad / 695 / 1
60%
master: 60%

Build:
DEFAULT BRANCH: master
Ran 27 Sep 2016 04:51PM UTC
Files 57
Run time 5s
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

27 Sep 2016 04:48PM UTC coverage: 52.715% (-0.1%) from 52.818%
SCALABRAD_VERSION=0.5.1

push

travis-ci

web-flow
Add ThreadedServer class to handle requests in a thread pool (#294)

Currently, most client-side code uses the synchronous Client class for talking to labrad, which blocks when making requests or returns Futures to allow for firing multiple requests and awaiting the results later. However, server-side code runs in the twisted reactor thread, uses AsyncClient, and must work in non-blocking fashion using twisted Deferreds (or inlineCallbacks). Among other things, this makes it hard to reuse code between servers and clients.

Here we implement a ThreadedServer class that handles requests and other lifecycle callbacks in a thread pool, and makes a synchronous Client available for using the server's labrad connection to make requests. This makes it possible to write server code in the more familiar blocking style and share this code between client and server, while still handling multiple requests concurrently on the server.

Implementing a ThreadedServer requires care to maintain thread safety of any shared data. For situations where concurrent request handling is not needed, we also provide a SingleThreadedServer class that dispatches server lifecycle methods and requests on a single thread. This makes it possible to implement a server without thinking about thread-safety or locks, but only one request can be handled at a time.

Review: @kunalq, @ejeffrey

4709 of 8933 relevant lines covered (52.71%)

0.53 hits per line

Source Files on job 695.1 (SCALABRAD_VERSION=0.5.1)
  • Tree
  • List 0
  • Changed 6
  • Source Changed 6
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 695
  • Travis Job 695.1
  • b2d061c8 on github
  • Prev Job for SCALABRAD_VERSION=0.5.1 on master (#680.1)
  • Next Job for SCALABRAD_VERSION=0.5.1 on master (#696.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