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

Commits on Aug 29, 2013

  1. Removes the need for the _Table_Locker class

    Replaces it with an anonymous struct type in the regular synchronized
    blocks.  This seems desirable to me since it prevents creating an extra
    class that is exposed but really shouldn't be.
    ryanhaining committed Aug 29, 2013
    Configuration menu
    Copy the full SHA
    ae2c47f View commit details
    Browse the repository at this point in the history
  2. Removes _Table_Locker entirely

    The _Table_Locker object is replaced with an anonymous struct type
    created in the foor loop.  It's definitely uglier but it removes the
    need to expose an additional class, something I never wanted to do in
    the first place.
    ryanhaining committed Aug 29, 2013
    Configuration menu
    Copy the full SHA
    f2400e1 View commit details
    Browse the repository at this point in the history

Commits on Sep 11, 2013

  1. Removes anonymous struct, replaces with std::pair

    The previous anonymous struct has a const reference to a temporary.  I
    realized this was unsafe (though it did, unfortunately work).  Using
    std::piecewise_construct and a pair, the _Table_Locker class can be
    eliminated safely.  It's not very pretty but I can finally eliminate
    that class entirely.
    ryanhaining committed Sep 11, 2013
    Configuration menu
    Copy the full SHA
    8218b86 View commit details
    Browse the repository at this point in the history

Commits on Sep 14, 2013

  1. Adds #include <functional>

    Coincidentally std::ref worked because something else was including
    <functional>.
    ryanhaining committed Sep 14, 2013
    Configuration menu
    Copy the full SHA
    0f19e7f View commit details
    Browse the repository at this point in the history

Commits on Sep 26, 2013

  1. Replaces pair/piecewise_construct with anon class

    Using c++11 inheriting constructors the pair can be eliminated and the
    TableLocker alternative is defined inline.  Inherits the lock_guard
    constructor and has a bool finished with a default of false.  afaik this
    behavior is all defined, there is no pair, just an anonymous class
    (finally).
    ryanhaining committed Sep 26, 2013
    Configuration menu
    Copy the full SHA
    6365cec View commit details
    Browse the repository at this point in the history
  2. Manges the name of the locker

    Instead of lg, it's now lgwithREALLYlongname to avoid collisions.  If I
    was writing for the standard I'd just prefix with an underscore, but I'm
    not implementing stdlib facilities so this seems for the best.
    ryanhaining committed Sep 26, 2013
    Configuration menu
    Copy the full SHA
    5545fbb View commit details
    Browse the repository at this point in the history
Loading