Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: lcdproc/lcdjava
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: lcdproc/lcdjava
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: dev
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 4 commits
  • 2 files changed
  • 1 contributor

Commits on Oct 2, 2016

  1. Reflow code

    antoneliasson committed Oct 2, 2016
    Configuration menu
    Copy the full SHA
    d3c34c9 View commit details
    Browse the repository at this point in the history
  2. Rewrite LCDSocketPoller to use blocking I/O instead of polling

    This made the shutdown procedure a little more interesting since
    BufferedReader's read(Line) cannot easily be interrupted. One possible
    solution is to use shutdownInput() on the socket to provoke an End of
    Stream [1], which is what is done here. The other way is to just close
    the socket, causing an IOException. I opted not to do that since I would
    have to suppress all IOExceptions in basically the entire run() method
    in LCDSocketPoller
    
    [1]: https://stackoverflow.com/questions/3595926/how-to-interrupt-bufferedreaders-readline
    antoneliasson committed Oct 2, 2016
    Configuration menu
    Copy the full SHA
    f8e532e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f3a4144 View commit details
    Browse the repository at this point in the history

Commits on Oct 5, 2016

  1. Communicate LCDd readiness with a Semaphore instead of polling

    Access to _lastLine is now properly synchronized. It is a bit ugly to
    use a field just to send back a status line once, but it seems the
    easiest way in the current implementation. It is also not customary to
    increment a semaphore more times than you plan on decrementing it, but
    it's not strictly illegal either.
    
    LCD::connect now only tries to connect once. Connection issues should be
    rare, and it is up to the application what to do if the first attempt
    should fail.
    antoneliasson committed Oct 5, 2016
    Configuration menu
    Copy the full SHA
    a4fca13 View commit details
    Browse the repository at this point in the history
Loading