- 18 Nov, 2016 3 commits
-
-
Christopher Dykes authored
Summary: The standard says this shouldn't be done, but GCC, Clang, and MSVC all do, at least, MSVC does if you don't pass the `/permissive-` switch to disable this non-compliant lookup. This just qualifies it with `this->` which solves the problem. MSVC plans to eventually (some time after the 2017 release) enable `/permissive-` by default, so let's start compiling with it now. Reviewed By: yfeldblum Differential Revision: D4200725 fbshipit-source-id: 8545c6bcda9ba6006733c15f668805cb1260517a
-
Christopher Dykes authored
Summary: This was relying on it being transitively included by system headers, which isn't the case under MSVC. Reviewed By: yfeldblum Differential Revision: D4199882 fbshipit-source-id: c25dc1e86687e19851923a1a660a91bcf63f0e6d
-
Christopher Dykes authored
Summary: Because MSVC doesn't let you access it without capturing it from within a lambda otherwise. Reviewed By: yfeldblum Differential Revision: D4199867 fbshipit-source-id: 7b829b2cc373edbebe3498901fa323c89a211818
-
- 17 Nov, 2016 7 commits
-
-
Srinivas \"Teja\" Rao authored
Summary: it seems second is the boolean that we need to compare. Closes https://github.com/facebook/folly/pull/518 Differential Revision: D4197096 Pulled By: yfeldblum fbshipit-source-id: 71987dafac0ddbdb7817b55732619edbe9aed81b
-
Nick Terrell authored
Summary: Replace deprecated functions with their functionally equivalent counterparts. See https://github.com/lz4/lz4/blob/dev/lib/lz4.c#L1405 and https://github.com/lz4/lz4/blob/dev/lib/lz4hc.c#L634 Reviewed By: Cyan4973 Differential Revision: D4194834 fbshipit-source-id: aa4f934c46fe764fcec8ea29221e3882da2b5cdf
-
Andrii Grynenko authored
Summary: This implements a view onto an EventBase, which can keep track of all tasks created through it and join them on destruction. Multiple VirtualEventBases can be backed by the same EventBase. This can be useful to have the same IO thread/thread-pool be shared between multiple libraries, allowing them to each have it's own VirtualEventBase and control its lifetime. Since VirtualEventBase also supports LoopKeepAlive and onDestruction functionality, it can be easily integrated with FiberManagerMap. Reviewed By: yfeldblum Differential Revision: D4158719 fbshipit-source-id: 7df964f36e5276e2b5665fd8394ea2e187aa298c
-
Lucian Grijincu authored
Summary: #accept2ship Reviewed By: yfeldblum Differential Revision: D4192095 fbshipit-source-id: eb0cad875bcc24d1c87a99890c51aea31f7024c9
-
Christopher Dykes authored
Summary: And also use it in a couple of tests, so that they can be compiled on Windows, where `pthread_t` is a struct rather than a pointer or integer. Reviewed By: yfeldblum Differential Revision: D4191560 fbshipit-source-id: 5bcf0a2952109b2a9bc5220c4640d42e2cdf8977
-
Delyan Kratunov authored
Summary: Including `iostream` in a header causes anything that uses this header to gain an extra static initializer for an `std::ios_base::Init` object. If there are N translation units in a library that use the header, that's N more static initializers that need to run. Reviewed By: yfeldblum Differential Revision: D4191798 fbshipit-source-id: 65b47401b9177177999cff65a47ac8dffa0e0546
-
Christopher Dykes authored
Summary: Because MSVC doesn't like it when you attempt to explicitly capture a c-style array in a lambda capture list. See: https://developercommunity.visualstudio.com/content/problem/2444/cannot-explicitly-capture-c-style-array-in-lambda.html Reviewed By: yfeldblum Differential Revision: D4191400 fbshipit-source-id: 305f8086c29f079ccf2c322f20da6393235bc76d
-
- 16 Nov, 2016 8 commits
-
-
Geert Van Laethem authored
Summary: Closes https://github.com/facebook/folly/pull/517 Reviewed By: igorsugak Differential Revision: D4191764 Pulled By: Orvid fbshipit-source-id: 5ab921bd0df0b9dbaca46cdf9ecdeea9ecda6f5a
-
Christopher Dykes authored
Summary: Because it won't compile due to an MSVC bug. See the link in the comment for more info. Reviewed By: yfeldblum Differential Revision: D4191233 fbshipit-source-id: 523deebe12379ff56934a4259b601d4ab677b9b6
-
Nathan Bronson authored
Summary: Constructing an empty FBVector by length results in a call to memset with a null destination, which is undefined behavior. This diff fixes it. Reviewed By: luciang, meyering, Gownta Differential Revision: D4191612 fbshipit-source-id: 3dcc091396fc33ac2230bd2d90906325131b0a3b
-
Christopher Dykes authored
Summary: Because, as discussed in past diffs, MSVC currently requires them to be static in order to resolve them from within the scope of a lambda when they aren't captured. The only one that actually needs to be marked as `static` is `numReps`, but I like consistency, so I marked them all as static. Reviewed By: yfeldblum Differential Revision: D4191610 fbshipit-source-id: 7246170f30551d2079b4373eefbf3d02aab6dfa9
-
Christopher Dykes authored
Summary: Because it had better be numeric or something is very wrong. Reviewed By: yfeldblum Differential Revision: D4190568 fbshipit-source-id: 52a5ebfcedb545201191fc48f66a4419eee8f748
-
Lucian Grijincu authored
Reviewed By: philippv Differential Revision: D4184097 fbshipit-source-id: 2f1f82b845528fea4667af612c92c348f8d9ec25
-
Christopher Dykes authored
Summary: MSVC currently has a bug that causes it to incorrectly resolve it to `std::queue`: https://developercommunity.visualstudio.com/content/problem/2342/c-failure-to-resolve-instance-member-in-lambda-con.html Reviewed By: lbrandy Differential Revision: D4187256 fbshipit-source-id: 207eafa339f7255ae881d8ab80f4847222c3b8c9
-
Christopher Dykes authored
Summary: Although currently the only one of these that isn't relocatable is `std::string`, making assumptions about the standard library is a terrible idea, so disable all of them. Reviewed By: yfeldblum Differential Revision: D4186024 fbshipit-source-id: 4d2a54d232df0cb05959a8d9cb1a2d2cf34d1302
-
- 15 Nov, 2016 6 commits
-
-
Andrii Grynenko authored
Reviewed By: yfeldblum Differential Revision: D4152380 fbshipit-source-id: 8b3c6dc4b14b9138bb5012e05f50496e51c0fa4b
-
Christopher Dykes authored
Summary: Because it is, and so that MSVC doesn't complain about things in the fingerprint table generator. Reviewed By: yfeldblum Differential Revision: D4178562 fbshipit-source-id: 8816f413bc100b42dd72f0e991aec8559b328e9b
-
Lucian Grijincu authored
Summary: Cleaner to isolate the #ifdefs to a constant than different code based on platform. Reviewed By: yfeldblum, Orvid Differential Revision: D4179949 fbshipit-source-id: 5b9975a78cf234f29a379c1dbe489373b7f1c253
-
Andrii Grynenko authored
Summary: This is useful to add more TimeoutManager implementations. Reviewed By: yfeldblum Differential Revision: D4178511 fbshipit-source-id: 9167cfe40e7487da1c35c537f9db8a2bdf085626
-
Andrii Grynenko authored
Reviewed By: yfeldblum Differential Revision: D4179908 fbshipit-source-id: 493b302cd7e9f7ebc851599b2ca5988af817387d
-
yizhiren authored
Summary: exchange A and B in this sentence : "Or, maybe x will execute in Thread B, but y and/or z will execute in Thread A". I think x in B and y,z in A is impossible. but x in A and y,z in B is possible, in that example. Closes https://github.com/facebook/folly/pull/514 Reviewed By: yfeldblum Differential Revision: D4176766 Pulled By: Orvid fbshipit-source-id: cf3a47a30d7e43e5291d6b6401198025beba33f8
-
- 14 Nov, 2016 1 commit
-
-
Alejandro Peláez authored
Summary: This reverts commit 5f2057f6ebfbdc971bc0b5594e3bc4b5a337aaef Differential Revision: D4164236 fbshipit-source-id: a397e6ba8c9d7a691cc6381b8f60bfcea3eb91b0
-
- 13 Nov, 2016 1 commit
-
-
Subodh Iyengar authored
Summary: Add ecdsa smart ptr. Reviewed By: knekritz Differential Revision: D4173310 fbshipit-source-id: abd5f799b3414b70128635c4390af6f2de329e11
-
- 12 Nov, 2016 5 commits
-
-
Andrii Grynenko authored
Summary: This is useful to add more TimeoutManager implementations. Reviewed By: yfeldblum Differential Revision: D4164236 fbshipit-source-id: 5f2057f6ebfbdc971bc0b5594e3bc4b5a337aaef
-
Marcin Pawlowski authored
Summary: the test fails a lot as seen on the task. To kill the connection in said test, we depeneded on destructor, however this uses a delayed destruction patter so I guess we did not destroy on time and we were failing the tests. I close socket explicitly. No idea if this misses the point of whole test. Reviewed By: yfeldblum Differential Revision: D4171111 fbshipit-source-id: 01b8c97a04a2bcdfaeeea522ca8bcae343d6bb5d
-
Mirek Klimos authored
Summary: This is causing a log spew on some services, let's remove it until we figure out where the problem is and fix Differential Revision: D4171379 fbshipit-source-id: 2afdab6917a2498c376559f9171f6e93ab9c8ad7
-
Andrii Grynenko authored
Reviewed By: marcinpe Differential Revision: D4171655 fbshipit-source-id: e6ef33c50d5d91e05250520171c959a893470460
-
Martin Martin authored
Summary: I accidentally forgot to specify the capacity for my MPMCQueue. When I then did a blockingRead(), I got a SIGFPE. Thanks to a custom signal handler that doesn't print stack traces, and a few more comedy of errors, I lost a day to this. With this patch, I would have gotten an assertion failure instead. Reviewed By: yfeldblum Differential Revision: D4169033 fbshipit-source-id: fab97ea0d5afc3c06885758b31a5e8c91ae75a45
-
- 11 Nov, 2016 4 commits
-
-
Mirek Klimos authored
Summary: We currently store the previous value on creation of RequestContextScopeGuard and reset it to the previous one when it goes out of scope - this means that if it's not unset properly somewhere, we'll prolong its life by saving it and restoring later. We need to do this because of some edge cases but a RequestContext should generally never be overridden by a different RequestContext - let's add a warning if this happens Reviewed By: djwatson, palmtenor Differential Revision: D3971904 fbshipit-source-id: e72b5f01102d18977d8aa5f8dca5a7802545098a
-
Andrew Gallagher authored
Reviewed By: yfeldblum Differential Revision: D4162763 fbshipit-source-id: 25c9bfae2e7679f4b98a3d64ee9f2319eb6e7f4a
-
Yedidya Feldblum authored
Summary: [Folly] Let `folly::range(const std::array<...>&)` be `constexpr`. This may be useful for future work. Reviewed By: simpkins Differential Revision: D4165608 fbshipit-source-id: 8f1064c3cdc07301e198acd596ff26724d603cdd
-
Jim Meyering authored
Summary: Fix these macros not to self-shadow for nested uses. How? Make each local variable name include __LINE__. This works in most cases, but not all: if you put the nested uses all on one line, you'll still get shadowing warnings. Reviewed By: yfeldblum Differential Revision: D4161553 fbshipit-source-id: 9e11ae6778272c733a4c820cfb30c5db59998a5b
-
- 10 Nov, 2016 5 commits
-
-
Christopher Dykes authored
Summary: Because the intrinsic version requires explicitly adding `__target__` attributes, which results in things not being inlined. Although the code generated with the `__target__` attribute is strictly better, ensuring it's applied on all the relevant functions is error-prone, so just use the inline assembly version for GCC/Clang so that it can be inlined elsewhere. MSVC will inline the intrinsic version without any issue. This also marks the functions as `ALWAYS_INLINE`, as the diff that is getting reverted made that change as well. Reviewed By: yfeldblum, philippv, ot Differential Revision: D3963935 fbshipit-source-id: 47175d64e7be351eb455a4d053b91ce9392bf152
-
Tudor Bosman authored
Summary: Some include files are not installed, causing including symbolizer/Symbolizer.h to fail. Closes https://github.com/facebook/folly/pull/512 Reviewed By: philippv Differential Revision: D4161113 Pulled By: luciang fbshipit-source-id: 5a5f8577f8d84ba33f89073781d374b99ba37df6
-
Christopher Dykes authored
Summary: Because, unfortunately, it isn't exported from the dynamic CRT dlls :( There's not really a nice way to handle this when using the dynamic CRT without doing very fragile hocus-pocus that relies on the exact layout and implementation details of the file descriptor table in the CRT, so the best we can really do is close the socket and just let the file descriptor itself leak. Reviewed By: yfeldblum Differential Revision: D4156558 fbshipit-source-id: 32cb4bf357f6746cf6597b66649ff9f018fb1bed
-
Phil Willoughby authored
Summary: Create a local std::ios_base::Init instance to ensure that it is valid, then use std::cerr. Reviewed By: yfeldblum, nbronson Differential Revision: D4139681 fbshipit-source-id: 03377dd417710e320a6b53298d507fd0168592f6
-
Andrii Grynenko authored
Reviewed By: yfeldblum, nbronson Differential Revision: D4149681 fbshipit-source-id: 37bd1b0b7d1ad6e6fa813228307abebfe772012f
-