- 12 Aug, 2015 1 commit
-
-
Hannes Roth authored
Summary: Perfect forwarding only works if the function is templated on the same type, not if the type is a class template. Discovered by @lbrandy. Reviewed By: @yfeldblum, @lbrandy Differential Revision: D2333005
-
- 11 Aug, 2015 3 commits
-
-
Hannes Roth authored
Summary: Not aligning `lambdaBuf_` can lead to unaligned reads, which can be a problem on some platforms. We use `lambdaBuf_` to store a type of up to `lambdaBufSize`, so aligning it to that should always be safe. Reviewed By: @alexshap Differential Revision: D2319347
-
Yedidya Feldblum authored
Summary: [Folly] Emplacement in folly::padded::Adaptor, if the adapted class allows. Reviewed By: @Gownta Differential Revision: D2157162
-
Noel Sardana authored
Summary: Implemented the given functions by porting similar functionality from the twitter Future utility. Reviewed By: @hannesr Differential Revision: D2303701
-
- 10 Aug, 2015 1 commit
-
-
Sara Golemon authored
-
- 09 Aug, 2015 1 commit
-
-
Brett Simmers authored
Summary: I added this to support logging with varying indentation levels, but it could also be useful in other situations. Examples are in the test/documentation. Reviewed By: @tudor Differential Revision: D2322206
-
- 07 Aug, 2015 1 commit
-
-
Yedidya Feldblum authored
Summary: [Folly] Avoid incorrect constexpr in folly/AtomicHashArray.h. It's actually not transitively constexpr, because it uses const values that are not themselves constexpr. Depending on the compiler, it could theoretically fail to build. Reviewed By: @Gownta Differential Revision: D2322143
-
- 06 Aug, 2015 2 commits
-
-
Anton Likhtarov authored
Summary: Mcrouter still enables these by default. Tracking down a perf regression in another code path that uses fibers. Reviewed By: @JohnRambo Differential Revision: D2320772
-
Alexander Shaposhnikov authored
Summary: Add a golden struct for checking the size of Core. It makes this test pass on OSX (now failing because of the different size of std::function). Reviewed By: @hannesr Differential Revision: D2315429
-
- 05 Aug, 2015 4 commits
-
-
Yedidya Feldblum authored
Summary: [Folly] ScopedEventBaseThread should support an EventBaseManager context. Reviewed By: @Gownta Differential Revision: D2314049
-
Yedidya Feldblum authored
Summary: [Folly] Use static const keys in AtomicHashArray::Config. From https://github.com/facebook/folly/pull/264/, MSVC may have a hard time with certain expressions. D2284130 factored them out as `static constexpr` members, but Clang had a hard time with that in HPHP. This adds a test case that triggers the same failure to the Folly build. Not quite sure how this impacts MSVC though. Reviewed By: @Gownta Differential Revision: D2304346
-
Orvid King authored
Summary: Because `.native()` returns a wide string on MSVC, but a normal string is expected by the rest of the code. Closes #283 Reviewed By: @yfeldblum Differential Revision: D2307488 Pulled By: @sgolemon
-
Orvid King authored
Summary: MSVC has some odd accessibility rules, so this makes a couple of things public rather than private. Closes #284 Reviewed By: @yfeldblum Differential Revision: D2307578 Pulled By: @sgolemon
-
- 04 Aug, 2015 3 commits
-
-
Nathan Bronson authored
Summary: Make RetryingTest more robust by giving it multiple chances to meeting timing criteria. Reviewed By: @yfeldblum Differential Revision: D2306245
-
Yedidya Feldblum authored
Summary: [Folly] Refactor extract FOLLY_SYNCHRONIZED_HAVE_TIMED_MUTEX. The same complex check is done in two places. Ick. Extract it to a single place. Reviewed By: @mzlee Differential Revision: D2302885
-
Alexander Shaposhnikov authored
Summary: Fix incorrect using of pthread in folly::ThreadLocal. The root of the trouble (see man pthread_key_create): "At thread exit, if a key value has a non-NULL destructor pointer, and the thread has a non-NULL value associated with that key, the value of the key is set to NULL, and then the function pointed to is called with the previously associated value as its sole argument." At thread exit we need to recover the thread-specific threadEntry otherwise the subsequent calls of getThreadEntry may recreate it (what actually DOES happen in the test ThreadLocalPtr.CreateOnThreadExit) and the newly created threadEntry will "leak". It will live longer than the corresponding thread violating the internal invariant of StaticMeta and also it will break the code of the method onThreadExit. In particular this bug causes the failure of the test ThreadLocalPtr.CreateOnThreadExit on OSX. Reviewed By: @lbrandy Differential Revision: D2304950
-
- 03 Aug, 2015 1 commit
-
-
Orvid King authored
Summary: It was originally unconditionally useing `__attribute__` syntax, so this makes it conditionally use the `__declspec` syntax. Closes #268 Reviewed By: @yfeldblum Differential Revision: D2283909 Pulled By: @sgolemon
-
- 02 Aug, 2015 1 commit
-
-
Yedidya Feldblum authored
Summary: [Folly] Fix ASAN failure in folly/io/async/test/NotificationQueueTest.cpp. Reviewed By: @djwatson Differential Revision: D2299112
-
- 01 Aug, 2015 1 commit
-
-
Brett Simmers authored
Summary: D2284130 broke the HHVM clang build. Reviewed By: @mxw Differential Revision: D2303914
-
- 31 Jul, 2015 12 commits
-
-
Michael Lee authored
Summary: Temp remove EventBaseLocal on mobile. Reviewed By: @djwatson Differential Revision: D2302322
-
Michael Lee authored
Summary: Do not use these if __ANDROID__ is defined as well. Reviewed By: @yangchi Differential Revision: D2301782
-
Orvid King authored
Summary: I have no idea why this specific declaration would error, or if there is a difference in meaning, but this fixes MSVC's absurd parser error. Closes #277 Reviewed By: @yfeldblum Differential Revision: D2284096
-
Orvid King authored
Summary: Improves MSVC support. Closes #274 Note that this diff has been heavily modified from @Orvid's original PR by @yfeldblum and @sgolemon Reviewed By: @yfeldblum Differential Revision: D2284035 Pulled By: @sgolemon
-
Orvid King authored
Summary: Closes #264 Modified by @sgolemon from the original PR to declare MSVC2015-final as the official minimum version, making the defines in the original PR unnecessary. Reviewed By: @yfeldblum Differential Revision: D2284130 Pulled By: @sgolemon
-
Nick Terrell authored
Summary: There are a bunch of methods in `folly::dynamic` that return a reference to a sub-object, e.g. `getString()`. These methods are a bit unsafe because it allows you to write code with dangling references when the `folly::dynamic` object is an rvalue: auto& obj = parse_json(some_string).at("key"); However, the bigger win is that when we have an rvalue `folly::dynamic`, such as returned by `getDefault(...)`, we can move the sub-object out: auto obj = parse_json(some_string).at("key"); auto str = obj.getDefault("another-key", "").getString(); In the first line, the subobject is copied out when it could be safely moved out. In the second line `getDefault(...)` copies the dynamic sub-object out, and then `getString()` copies the string out, when the string could be moved. Also in the case of `getDefault()` being called on a rvalue, we can move the sub-object out. Reviewed By: @marcinpe Differential Revision: D2267588
-
Sophia Wang authored
Summary: remove unnecessary stuff Reviewed By: @siyengar Differential Revision: D2284095
-
Brian Watling authored
Summary: Add accessor to estimate a FiberManager's run queue size Reviewed By: @sarangbh Differential Revision: D2293367
-
Andrew Gallagher authored
Reviewed By: @yfeldblum Differential Revision: D2300047
-
Andrew Gallagher authored
Summary: Various fixes to get tests passing using buck's dev mode. Reviewed By: @yfeldblum Differential Revision: D2299981
-
Yedidya Feldblum authored
Summary: [Folly] futures::retrying. Reviewed By: @fugalh Differential Revision: D2201630
-
Ondrej Lehecka authored
Summary: enum iterators operator!= didn't use the iterator parameter for comparison because they assumed you only ever compare to end. Change the operator!= to look at the iterator parameter to check if it was end. Thrift generated code for reflection initializers for some types that weren't declared before definition because they were never called outside of the file. Marked those initializers as 'static'. Reviewed By: @alandau Differential Revision: D2284371
-
- 30 Jul, 2015 3 commits
-
-
Mark McDuff authored
Summary: This has come up a couple times, and the implementation is never nice. Just like we have thread-local storage, it will be useful to also have evb-local storage. Provides at pretty simple get/set/delete interface (see unittest). Reviewed By: @djwatson Differential Revision: D2203063
-
Nima Aghdaii authored
Summary: folly only accepts "Infinity" while deserializing but writes "infinity" when serializing. This means folly cannot deserialize what it serialized before. If we agree on this, we could update ##fbcode/common## as well: https://fburl.com/136793901 Reviewed By: @marcinpe Differential Revision: D2293627
-
Orvid King authored
Summary: This `typename` qualifier was unneeded, and MSVC errors if it's there, so remove it. Closes #275 Reviewed By: @yfeldblum Differential Revision: D2284056 Pulled By: @sgolemon
-
- 29 Jul, 2015 6 commits
-
-
Orvid King authored
Summary: MSVC doesn't support constructor priorities, so use the same code as OSX. Closes #272 Reviewed By: @yfeldblum Differential Revision: D2283998 Pulled By: @sgolemon
-
Orvid King authored
Summary: Support for this under mingw was already present, this just uses that for MSVC as well. Closes #273 Reviewed By: @yfeldblum Differential Revision: D2284007 Pulled By: @sgolemon
-
Orvid King authored
Summary: Specifically, MSVC doesn't define `std::__ostream_insert`, so just write to the stream instead. Closes #270 Reviewed By: @yfeldblum Differential Revision: D2283960 Pulled By: @sgolemon
-
Orvid King authored
Summary: Because MSVC doesn't support `__thread`, and `FOLLY_TLS` is already setup to use the MSVC syntax when needed. Closes #269 Reviewed By: @yfeldblum Differential Revision: D2283919 Pulled By: @sgolemon
-
Orvid King authored
Summary: This adds `asm_volatile_memory`, which goes along with the same style used by `asm_volatile_pause`. This also switches the two places in `RWSpinLock.h` that were using inline assembly for this to use the new functions instead. Closes #260 Reviewed By: @yfeldblum Differential Revision: D2283541 Pulled By: @sgolemon
-
Orvid King authored
Summary: This adds `FOLLY_ALIGNED` to `Portability.h`, and adjusts the places that were previously using the raw aligned attribute to use this instead. Closes #262 Reviewed By: @yfeldblum Differential Revision: D2283639 Pulled By: @sgolemon
-