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: robotdotnet/allwpilib
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: robotdotnet/allwpilib
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: DriverStationLockingJava
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Jan 12, 2016

  1. Implements a ReadWrite Lock for Java DS Joysticks

    The locking currently in the DriverStation is locking on "this", which
    is not a good idea. This changes to use a specific lock for joystick
    data, and changes that to be a ReadWrite lock. Once the data is cached,
    all threads can safely read from the cache at any time. Then when there
    is new data, the DS thread grabs an exclusive write lock, caches the
    data, and then lets the readers go again.
    
    One thing to note is that this does not fix the inefficiency issues with
    the GetData method (it holds the lock for 5 ms out of every 20ms),
    however to fix that would require JNI changes in a later patch. Then it
    would match the C++ locking changes added.
    
    Change-Id: Ide2e68c412e286be3d8322df761cbe7dc473848e
    ThadHouse committed Jan 12, 2016
    Configuration menu
    Copy the full SHA
    353f248 View commit details
    Browse the repository at this point in the history
Loading