1. 11 Sep, 2015 4 commits
  2. 10 Sep, 2015 4 commits
    • Mark McDuff's avatar
      use thread_local instead of ThreadLocal for some statics in Random · 6caa3d95
      Mark McDuff authored
      Summary: Exit synchronization is the worst!  The worst!
      
      Reviewed By: @​bmaurer
      
      Differential Revision: D2253073
      6caa3d95
    • Giuseppe Ottaviano's avatar
      Make EliasFanoReader and BitVectorReader API more consistent · 2baf3f69
      Giuseppe Ottaviano authored
      Summary: This diff introduces a few breaking API changes to both EliasFanoReader and BitVectorReader in order to fix some inconsistencies:
      
      - As initalized, `EliasFanoReader` and `BitVectorReader` held a value of `0`, thus if `0` is present in the list `skipTo(0)` would not update the position to `0`, as it happens with any other `skipTo(<first element>)`. This fixes `jumpTo` accordingly.
      - `jump(i + 1)` would go at position `i`. Now `reader.jump(i)`'s postcondition is `reader.position() == i`.
      - It is now illegal to retrieve `value()` from a reader in an out-of-bounds position (before-the-begin or past-the-end). Validity of a reader can be checked with `valid()`.
      
      Reviewed By: @philippv
      
      Differential Revision: D2420023
      2baf3f69
    • Elliott Clark's avatar
      Add SharedPromise<T>::isFulfilled · fc0470a9
      Elliott Clark authored
      Summary: Promise<T> has isFulFilled. This patch adds the corresponding functionality to shared promise.
      
      Reviewed By: @jsedgwick
      
      Differential Revision: D2417631
      fc0470a9
    • Lucian Grijincu's avatar
      folly: small_vector: emplace_back for iterator constructor (compat with std::vector) · 9f9e6d96
      Lucian Grijincu authored
      Summary: This works:
        std::vector<T*> v;
        std::vector<std::unique_ptr<T>> uv(v.begin(), v.end())
      
      Make it work for small_vector as well.
      
      Reviewed By: @ot, @Gownta
      
      Differential Revision: D2426919
      9f9e6d96
  3. 09 Sep, 2015 3 commits
    • Eugene Pekurovsky's avatar
      folly::FunctionScheduler: Adding support for uniform interval distribution · 3e6ccd5c
      Eugene Pekurovsky authored
      Summary: 1) Added uniform interval distribution functionality.
      2) Added a generic API for custom interval distribution algorithms.
      3) Fixed an issue with removing a canceled function.
      4) Did some code cleanup along the way.
      
      Reviewed By: @​kaanb
      
      Differential Revision: D2339911
      3e6ccd5c
    • Tom Jackson's avatar
      Handle take(-1) better · 6699f91a
      Tom Jackson authored
      Summary: It's easy to accidentally pass a negative value to ##take()##, which leads to underflow on conversion to ##size_t##.
      
      Reviewed By: @​rosephilip, @philippv
      
      Differential Revision: D2421459
      6699f91a
    • Yedidya Feldblum's avatar
      Drop support for GCC < 4.8 in folly/Conv.h · 541d1209
      Yedidya Feldblum authored
      Summary: [Folly] Drop support for GCC < 4.8 in folly/Conv.h.
      
      Can't stay indefinitely backcompat with older compilers.
      
      Reviewed By: @Gownta, @JoelMarcey
      
      Differential Revision: D2422369
      541d1209
  4. 08 Sep, 2015 5 commits
    • Yedidya Feldblum's avatar
      Drop support for GCC < 4.8 in folly/test/FBStringTest.cpp · 26164748
      Yedidya Feldblum authored
      Summary: [Folly] Drop support for GCC < 4.8 in folly/test/FBStringTest.cpp.
      
      Can't stay indefinitely backcompat with older compilers.
      
      Reviewed By: @tudor
      
      Differential Revision: D2422425
      26164748
    • Giuseppe Ottaviano's avatar
      Implement assume() · b6a63714
      Giuseppe Ottaviano authored
      Summary: In some cases hinting the compiler about conditions that are guaranteed
      to be true can help it generate better code. For instance, remove
      unnecessary bound checks. Clang has `__builtin_assume` and on GCC we
      can simulate it with `__builtin_unreachable`, so better just abstract
      both into a function.
      
      Reviewed By: @philippv
      
      Differential Revision: D2419937
      b6a63714
    • Orvid King's avatar
      Switch a local from long to size_t for MSVC · 37cd970a
      Orvid King authored
      Summary: Because MSVC would try to calculate the mmapLength as a long value, which isn't correct, and MSVC issues multiple warnings if you try to do it.
      Closes #289
      
      Reviewed By: @yfeldblum
      
      Differential Revision: D2419061
      
      Pulled By: @JoelMarcey
      37cd970a
    • Tom Hughes's avatar
      Implement adjacent_tokens_only() for GFlagValueSemanticBase · 29193aca
      Tom Hughes authored
      Summary: Needed for boost 1.59.0 which added this as a pure virtual function
      in the value_semantic base class. Fixes #314.
      Closes #315
      
      Reviewed By: @yfeldblum
      
      Differential Revision: D2419035
      
      Pulled By: @JoelMarcey
      29193aca
    • Christopher Dolan's avatar
      Declare missing environ variable · f0fdd87a
      Christopher Dolan authored
      Summary: Declaring `extern char** environ` in `experimental/TestUtil.cpp` fixes a compilation issue on OS X 10.10.
      Closes #311
      
      Reviewed By: @yfeldblum
      
      Differential Revision: D2419037
      
      Pulled By: @JoelMarcey
      f0fdd87a
  5. 07 Sep, 2015 1 commit
  6. 04 Sep, 2015 2 commits
  7. 03 Sep, 2015 1 commit
  8. 02 Sep, 2015 2 commits
    • Sven Over's avatar
      folly: specialise makeFutureWith for functions returning futures · 823a8c01
      Sven Over authored
      Summary: makeFutureWith executes a function and returns a future containing
      set to the function's return value. This diff adds a specialisation
      for the case when the function returns some type Future<T>. Instead
      of returning Future<Future<T>>, makeFutureWith now just passes
      on the future that the function returned, which may or may not have
      a value set at this time. In case the function throws,
      makeFutureWith returns a Future<T> containing the exception.
      
      With this diff, the following two lines produce equivalent results:
        auto f1 = makeFutureWith(func);
        auto f2 = makeFuture().then(func);
      except for the fact that f2 requires an additional temporary
      Future<Unit> to be created and destroyed.
      
      Reviewed By: @fugalh
      
      Differential Revision: D2388335
      823a8c01
    • Haijun Zhu's avatar
      Erasing Cpp2Worker in its evb thread · f1190644
      Haijun Zhu authored
      Summary: Erasing Cpp2Worker happens in acceptor thread but when evb is
      destroyed and drains its callback queue, the callbacks may access the
      worker. This moves erasing Cpp2Worer to its own evb thread, after all
      callbacks are run.
      
      Reviewed By: @yfeldblum
      
      Differential Revision: D2398089
      f1190644
  9. 31 Aug, 2015 9 commits
    • Sara Golemon's avatar
      Bump version to 57:0 · 076bfa05
      Sara Golemon authored
      076bfa05
    • Jason Evans's avatar
      Universally update to jemalloc 4.0.0. · ac354aba
      Jason Evans authored
      Summary: Universally update to jemalloc 4.0.0.
      
      Update MALLOC_CONF/malloc_conf configuration, and use the
      "arena.<i>.purge" mallctl (replaces "arenas.purge").
      
      Reviewed By: @​bmaurer
      
      Differential Revision: D2355602
      ac354aba
    • Kyle Nekritz's avatar
      Log TLS signature_algorithms extension values. · 6dd4bc6a
      Kyle Nekritz authored
      Summary: Provide a folly interface for logging the client supported TLS signature algorithms.
      
      Reviewed By: @siyengar
      
      Differential Revision: D2374528
      6dd4bc6a
    • Sara Golemon's avatar
      Revert "Mass Revert to cdb635a" · c8639608
      Sara Golemon authored
      This reverts commit 37f45ee5 which should not have been pushed.
      c8639608
    • Sara Golemon's avatar
      Bump version to 56:0 · eb5f6241
      Sara Golemon authored
      eb5f6241
    • Michael Lee's avatar
      Mass Revert to cdb635a · 37f45ee5
      Michael Lee authored
      Reviewed By: @​sarals, @siyengar, @​dpittman, @​alephbax
      37f45ee5
    • Michael Morton's avatar
      Adding singular token bucket implementation. · 280e99ae
      Michael Morton authored
      Summary: Contains only the central implementation of the TokenBucket, without moving other files to use the new implementation.
      
      Reviewed By: @yfeldblum
      
      Differential Revision: D2329892
      280e99ae
    • Mainak Mandal's avatar
      make doNotOptimizeAway work with clang · a3c67e00
      Mainak Mandal authored
      Summary: Projects depending on benchmark library fail to build with clang with the following error
      ```
      ./folly/Benchark.h:263:16: error: inline asm not supported yet: don't know how to handle tied indirect register inputs
      ```
      
      I am not an expert here, just tried to take an approach similar to the MSVC compiler clause
      
      Reviewed By: @andralex, @yfeldblum
      
      Differential Revision: D2368670
      a3c67e00
    • Yedidya Feldblum's avatar
      Fix the example for folly::static_function_deleter. · 148045d0
      Yedidya Feldblum authored
      Summary: [Folly] Fix the example for folly::static_function_deleter.
      
      The problem is that
      
          int BIO_free(BIO*)
      
      is not directly compatible.
      
      So have two examples. One using `RSA_free` which is compatible, and one making a compatible wrapper around `BIO_free`.
      
      Reviewed By: @Gownta
      
      Differential Revision: D2381125
      148045d0
  10. 25 Aug, 2015 2 commits
  11. 24 Aug, 2015 2 commits
  12. 23 Aug, 2015 2 commits
  13. 21 Aug, 2015 3 commits
    • Yedidya Feldblum's avatar
      static_function_deleter. · 74a1c035
      Yedidya Feldblum authored
      Summary: [Folly] static_function_deleter.
      
      So you can write this:
      
          using BIO_deleter = folly::static_function_deleter<BIO, &BIO_free>;
          auto buf = std::unique_ptr<BIO, BIO_deleter>(BIO_new(BIO_s_mem()));
          buf = nullptr;
      
      In place of this:
      
          struct BIO_deleter {
            void operator()(BIO* bio) {
              BIO_free(bio);
            }
          };
          auto buf = std::unique_ptr<BIO, BIO_deleter>(BIO_new(BIO_s_mem()));
          buf = nullptr;
      
      Reviewed By: @alandau
      
      Differential Revision: D2364544
      74a1c035
    • Jim Meyering's avatar
      folly: update README.md for newer Fedora · 671368be
      Jim Meyering authored
      Summary: Running ./configure on Fedora 21 failed until I installed some
      more prerequisite packages.  Add them to the list in README.md.
      
      Reviewed By: @markisaa
      
      Differential Revision: D2369708
      671368be
    • Maxim Georgiev's avatar
      Add a default timeout parameter to HHWheelTimer. · 81bb353a
      Maxim Georgiev authored
      Summary: Currently HHWheelTimer requires providing an explicit timeout value every time a new timeout is scgeduled. This change adds an optional "default timeout" parameter. With this parameter set, HHWheelTimer can be used the same way as AsyncTimeoutSet. Variable timeout functionality is still available even if the default parameter is set.
      
      Reviewed By: @djwatson
      
      Differential Revision: D2366783
      81bb353a