1. 08 Nov, 2014 7 commits
    • Nicholas Ormrod's avatar
      Make dynamic noexcept · ba88b3f6
      Nicholas Ormrod authored
      Summary:
      Many dynamic operations, including its move constructor, are
      noexcept but not labeled so. Labeled some important functions as
      noexcept.
      
      Test Plan: run unit tests
      
      Reviewed By: delong.j@fb.com
      
      Subscribers: tudorb, philipp, sdwilsh, njormrod, folly-diffs@
      
      FB internal diff: D1644380
      
      Tasks: 5486739
      
      Signature: t1:1644380:1414618757:fb910d8a3fe3e634da4215c432577edf7371be61
      ba88b3f6
    • Daniel Sommermann's avatar
      Fix -Wsign-compare · 3d420c10
      Daniel Sommermann authored
      Summary:
      Fixed unsigned/signed compares.
      
      I had to suppress the warning in one place, but don't worry, clang
      supports `#pragma GCC diagnostic ...` (see http://clang.llvm.org/docs/UsersManual.html#controlling-diagnostics-via-pragmas)
      
      Test Plan: unit tests
      
      Reviewed By: afrind@fb.com
      
      Subscribers: alandau, mshneer, trunkagent, doug, jdperlow, bmatheny, njormrod, cgheorghe, folly-diffs@
      
      FB internal diff: D1624249
      
      Tasks: 5140804
      
      Signature: t1:1624249:1414620209:5399e8d90d8ca32b30794a7b2a4a7c2d7d437dda
      3d420c10
    • Nicholas Ormrod's avatar
      Override #define of keyword · 79b456fe
      Nicholas Ormrod authored
      Summary:
      Add a hidden option to suppress ###define [keyword]##, which is
      occasionally appropriate.
      
      Test Plan:
      Build flint, run it on FBString.h, see no error.
      Ran flint tests locally, see no errors.
      
      Reviewed By: andrei.alexandrescu@fb.com
      
      Subscribers: sdwilsh, louisk, njormrod, folly-diffs@
      
      FB internal diff: D1644182
      
      Tasks: 5486739
      
      Signature: t1:1644182:1414616294:4b6004d358cba865455366f5a943644b3542ae51
      79b456fe
    • Nicholas Ormrod's avatar
      Override for include-guard · 978cb2f0
      Nicholas Ormrod authored
      Summary:
      In certain circumstances, it is appropriate to omit and include
      guard. Add an option to allow this to be overriden.
      
      Test Plan: Build flint, run it on folly, see no include-guard errors.
      
      Reviewed By: andrei.alexandrescu@fb.com
      
      Subscribers: sdwilsh, louisk, njormrod, folly-diffs@
      
      FB internal diff: D1644170
      
      Tasks: 5486739
      
      Signature: t1:1644170:1414616595:7ac52f474c1312a0c28e89255b1151d56c680acf
      978cb2f0
    • Nicholas Ormrod's avatar
      Allow catch-int to be nolinted · 8b05be27
      Nicholas Ormrod authored
      Summary:
      Add a hidden nolint option to suppress this lint warning. It is
      appropriate in this case.
      
      Test Plan:
      Build flint, run it on ExceptionWrapperTest.cpp, see no catch
      lint failure
      
      Reviewed By: andrei.alexandrescu@fb.com
      
      Subscribers: sdwilsh, louisk, njormrod, folly-diffs@
      
      FB internal diff: D1644165
      
      Tasks: 5486739
      
      Signature: t1:1644165:1414616664:a6b9dc34660df84b33ed8faaf48ec048a02bad01
      8b05be27
    • Nicholas Ormrod's avatar
      Move constructors should be noexcept · 75c6adfa
      Nicholas Ormrod authored
      Summary:
      The compiler is able to make some nice optimizations when it
      knows that move constructors are noexcept. (In particular, it helps a
      lot inside of std::vector if you don't need to worry about the
      possibility of exception during reallocation.) Some move constructors in
      folly are obviously moveable: change them.
      
      Test Plan: unit tests
      
      Reviewed By: delong.j@fb.com
      
      Subscribers: trunkagent, sdwilsh, njormrod, folly-diffs@
      
      FB internal diff: D1644296
      
      Tasks: 5486739
      
      Signature: t1:1644296:1414618605:d9a0db5193c82650b96e9c62b019d5da218b15c5
      75c6adfa
    • James Sedgwick's avatar
      Future<T>::then([](T&&)), aka next() · 449e2596
      James Sedgwick authored
      Summary:
      variants of then() that bypass Try and forward any exceptions up to the next future. like next() from http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3865.pdf
      
      this could go a long way towards reducing spurious rethrows wherever people don't ever actually catch exceptions in their continuations, which is probably often enough.
      
      anyone know if there's something in folly or standard library that does what my silly VoidWrapper struct does?
      
      there's a lot of copypasta here but i'm not sure consolidating into helpers would actually be useful considering the amount of template crap, i don't feel strongly about it though.
      
      Test Plan: added unit
      
      Reviewed By: hans@fb.com
      
      Subscribers: trunkagent, sammerat, fugalh, njormrod, folly-diffs@, bmatheny
      
      FB internal diff: D1641776
      
      Signature: t1:1641776:1414610434:c742563b8061a748fca9292fc2765081edcf9d52
      449e2596
  2. 29 Oct, 2014 33 commits
    • dcsommer's avatar
      Bump version to 14:0 · 32a9723a
      dcsommer authored
      32a9723a
    • Sean Cannella's avatar
      Really fix the clang warning in Format-inl.h · 2f5c6c3e
      Sean Cannella authored
      Summary:
      The previous diff added the safety check but didn't actually
      remove the compiler warning. This is what I get for doing an incremental
      compile.
      
      Test Plan: fbmake clean ; fbmake dbg with clang:dev
      
      Reviewed By: meyering@fb.com
      
      Subscribers: trunkagent, mathieubaudet, njormrod, folly-diffs@, bmatheny, ranjeeth, subodh, kmdent, fma, benyluo
      
      FB internal diff: D1646519
      
      Signature: t1:1646519:1414602292:cfb908ae094caaef02e64eb2c42544fd34fa1389
      2f5c6c3e
    • Nicholas Ormrod's avatar
      Fix spelling mistakes · 9faada6d
      Nicholas Ormrod authored
      Summary: @override-unit-failures
      
      Test Plan: n/a
      
      Reviewed By: rhysparry@fb.com
      
      Subscribers: sdwilsh, njormrod, folly-diffs@
      
      FB internal diff: D1644139
      
      Tasks: 5486739
      
      Signature: t1:1644139:1414553949:626fdca07a583c3d5017abe19408a5e6f6d7674a
      9faada6d
    • Nicholas Ormrod's avatar
      Fix multiple includes · 19b982dc
      Nicholas Ormrod authored
      Summary:
      Add nolint comments to appropriate multiply-included files.
      Removed raw duplicates from StlVectorTest.
      
      Test Plan:
      fbconfig -r folly && fbmake runtests
      
      Ran arc lint, see no "included multiple times" messages
      
      Reviewed By: robbert@fb.com
      
      Subscribers: sdwilsh, njormrod, folly-diffs@
      
      FB internal diff: D1644144
      
      Tasks: 5486739
      
      Signature: t1:1644144:1414599280:1e403ea3675d2173b249c4ce6db0dad621a139bc
      19b982dc
    • Nicholas Ormrod's avatar
      operator bool() · 9a88e5b5
      Nicholas Ormrod authored
      Summary:
      Among all of the implicit conversions, conversion to bool is
      particularly tricky. For this reason, it has a special call-out in flint
      among the casts, and canno be overriden.
      
      However, there are legitimate use cases for operator bool. In this case,
      we have a iterator that logically represents a bool but in practice
      represents a packed integral. This class needs to be implicitly
      convertible to bool, and warrants an override.
      
      Push blocking tests have had over a day to complete, but haven't.
      Further, the folly change is comment-only.
      
      Test Plan:
      Build flint, run it on BitIteratorDetail.h, see no more lint
      errors
      
      Reviewed By: andrei.alexandrescu@fb.com
      
      Subscribers: sdwilsh, louisk, njormrod, folly-diffs@
      
      FB internal diff: D1644141
      
      Tasks: 5486739
      
      Signature: t1:1644141:1414607351:29740da758b75187f4f7b6b5a5ad28a523e7080d
      9a88e5b5
    • Nicholas Ormrod's avatar
      __attribute__s need double underscore · 538cd253
      Nicholas Ormrod authored
      Summary: See D1508946 for the rationale behind this lint message.
      
      Test Plan:
      fbconfig -r folly && fbmake dbg
      
      Reviewed By: hans@fb.com
      
      Subscribers: sdwilsh, fugalh, njormrod, folly-diffs@
      
      FB internal diff: D1644190
      
      Tasks: 5486739
      
      Signature: t1:1644190:1414532704:87d5851f363cf37c58f7e7c3d57c8210a792d4a1
      538cd253
    • Hans Fugal's avatar
      move clang disable of Thens.cpp to thens.rb · 95f6a93c
      Hans Fugal authored
      Summary: So when we re-generate code we don't cause clang test failures (until #4412111 is done)
      
      Test Plan: git diff
      
      Reviewed By: jsedgwick@fb.com
      
      Subscribers: net-systems@, fugalh, mathieubaudet, exa, njormrod, folly-diffs@
      
      FB internal diff: D1644550
      
      Tasks: 4412111
      
      Signature: t1:1644550:1414604128:8184e7ce1f3e417c170ef67346d553caecc1f013
      95f6a93c
    • Dave Watson's avatar
      Move AsyncSocket to folly (try 2) · 03bcae3a
      Dave Watson authored
      Summary:
      
      Test Plan:
      
      Reviewed By: dcsommer@fb.com
      
      Subscribers: trunkagent, mcduff, hitesh, doug, alandau, bmatheny, njormrod, mshneer, folly-diffs@
      
      FB internal diff: D1644071
      
      Signature: t1:1644071:1414526899:c41dd55e2957a7e1fcc54508e20cdb4a9c8c30d4
      03bcae3a
    • Sean Cannella's avatar
      Address clang sign warning in Format-inl.h · 4be80873
      Sean Cannella authored
      Summary:
      This has been bothering me for a while when I've been trying to
      verify builds with clang. This generates a ton of spew and the current
      code can't actually handle non-default negatives so let's just throw if
      we see one.
      
      Test Plan: fbmake runtests
      
      Reviewed By: meyering@fb.com
      
      Subscribers: mathieubaudet, njormrod, folly-diffs@, bmatheny, benyluo, shikong, kmdent, fma, ranjeeth, subodh
      
      FB internal diff: D1643881
      
      Signature: t1:1643881:1414523777:085035ce8c280fbd6481b2ce0354b53b96fdc50e
      4be80873
    • Hans Fugal's avatar
      kill threadgate · b8c06335
      Hans Fugal authored
      Test Plan: This diff is actually the test plan. It was contbuild bait. I fixed things that broke (in separate diffs), and then I rebased this on top, everything is green, and we pulled the trigger.
      
      Reviewed By: davejwatson@fb.com
      
      Subscribers: trunkagent, net-systems@, fugalh, exa, njormrod, folly-diffs@
      
      FB internal diff: D1632937
      
      Tasks: 5409538
      
      Signature: t1:1632937:1414531009:4dbaa9513fbfba45a9c63e7be3de3646a6e926a2
      b8c06335
    • Dave Watson's avatar
      Add MemoryIdler suppot to IOThreadPoolExecutor · 4ebfdff3
      Dave Watson authored
      Summary:
      Idle memory in IO threads.   If loop is unused for a period of time, free associated memory, and call epoll again.
      
      Had to add a new list of callbacks that don't make the loop nonblocking (i.e. using runInLoop() instead would use the nonblocking version of epoll).
      
      Could bake this in to EventBase directly, but that seems like the wrong abstraction, since EventBase doesn't actually control the thread - for example, that approach would also free up memory for stack-allocated EventBases where they are used synchronously by clients.
      
      This diff doesn't change IO scheduling at all - current IO work is round robin, so this probably only helps if the whole server is idle (at least until we add smarter scheduling)
      
      Test Plan:
      Based on top of D1585087.
      
      fbconfig thrift/perf/cpp; fbmake dbg
      _bin/thrift/perf/cpp/ThriftServer
      _bin/thrift/perf/cpp/loadgen -num_threads=100 -weight_sendrecv=1 -cpp2 -async
      
      Ran loadgen for a while, watched res memory in top.  Stopped loadgen.  After ~5 sec, res memory was much reduced.
      
      Reviewed By: jsedgwick@fb.com
      
      Subscribers: trunkagent, doug, fugalh, njormrod, folly-diffs@
      
      FB internal diff: D1641057
      
      Tasks: 5002425
      4ebfdff3
    • Viswanath Sivakumar's avatar
      Revert "D1587625 [thrift->folly] AsyncSocket" · 889093b2
      Viswanath Sivakumar authored
      Summary:
      
      Test Plan:
      
      Reviewed By: cgheorghe@fb.com
      
      Subscribers:
      
      FB internal diff: D1642334
      
      Blame Revision: D1587625
      889093b2
    • Adam Simpkins's avatar
      improve io::Appender functionality · 1d33fd21
      Adam Simpkins authored
      Summary:
      Add an operator()(StringPiece) method to Appender, so it can be used
      directly with folly::Formatter objects.  Also add printf() and vprintf()
      methods to Appender, for places that need to use existing printf-style
      formatting.
      
      This also includes versions of push() and pushAtMost() that accept
      ByteRange objects.  Previously we only had push() implementations that
      took separate buffer and size arguments.
      
      Test Plan: Added new unit tests to IOBufCursorTest.cpp
      
      Reviewed By: davejwatson@fb.com
      
      Subscribers: trunkagent, doug, net-systems@, exa, njormrod
      
      FB internal diff: D1583684
      1d33fd21
    • Dave Watson's avatar
      Add missing headers · 6ba489cb
      Dave Watson authored
      Summary: Jenkins ci build was broken for a while, so we missed these  in contbuild results
      
      Test Plan: watch ci build for fbthrift
      
      Reviewed By: hans@fb.com
      
      Subscribers: doug, fugalh, njormrod, folly-diffs@
      
      FB internal diff: D1641515
      6ba489cb
    • Dave Watson's avatar
      AsyncSocket · 95084352
      Dave Watson authored
      Summary:
      Move async socket to folly.
      
      Changes:
      * Made an AsyncSocketException type instead of TTransportException: Some of the exceptions didn't fit nicely in to std::exception types (like TIMED_OUT).  There are some wrappers in thrift/lib/cpp/async to convert back to TTransportException, so all existing code still compiles.
      * Moved read/write callbacks out of AsyncTransport: filters are going to want to do the read/write stuff separately (see revproxy/tunnel/filters, and discussions in D1483148).
      
      Test Plan:
      fbconfig -r thrift; fbmake runtests
      contbuild should catch everything else - exception types shouldn't change for existing code
      
      Reviewed By: dcsommer@fb.com
      
      Subscribers: mshneer, folly-diffs@, trunkagent, doug, alandau, bmatheny, njormrod, fugalh, jsedgwick
      
      FB internal diff: D1587625
      95084352
    • Hans Fugal's avatar
      (wangle) fix race in Core::detachOne() · eec32a76
      Hans Fugal authored
      Summary:
      In D1618240 I introduced a race condition in `detachOne()`, where `detached_` is incremented and then tested. If the promise and future are racing, they can both see `detached_ == 2` in the conditional, and then they'll both try to free the Core object. This fixes that.
      
      It also fixes a related problem (which actually showed up more often with the test I wrote), where we transition into the Done state before setting the value, and then `maybeCallback()` observes the state is Done (because we're just reading an atomic, not grabbing the lock, which is intentional), tries to execute the callback, but `folly::Optional` throws an exception because the value hasn't been set yet (at least in debug it does). I should have listened to my gut and kept the state assignment after the transition action in the first place.
      
      Test Plan: New unit test
      
      Reviewed By: jsedgwick@fb.com
      
      Subscribers: trunkagent, net-systems@, fugalh, exa, njormrod, folly-diffs@, mnd
      
      FB internal diff: D1636490
      
      Tasks: 5438209
      
      Blame Revision: D1618240
      eec32a76
    • Hans Fugal's avatar
      unrevert "(wangle) express current Core functionality with a state machine"" · 3d6fc64f
      Hans Fugal authored
      Summary: Reverts D1633874. Companion to D1636490 which fixes the bug.
      
      Test Plan:
      git reverting code that was git reverted and hasn't changed in the interim
      Won't be checked in without the companion bugfix diff (D1636490)
      
      Reviewed By: davejwatson@fb.com
      
      Subscribers: trunkagent, net-systems@, fugalh, exa, njormrod, folly-diffs@
      
      FB internal diff: D1636487
      
      Tasks: 5438209
      
      Blame Revision: D1633874
      3d6fc64f
    • Dave Watson's avatar
      Remove some leftover apache paths · 4a29942e
      Dave Watson authored
      Summary: EventBaseManager was moved to folly, we shouldn't have deps on apache
      
      Test Plan: fbconfig -r folly/experimental/wangle/concurrency; fbmake runtests
      
      Reviewed By: hans@fb.com
      
      Subscribers: doug, fugalh, njormrod, folly-diffs@
      
      FB internal diff: D1636006
      4a29942e
    • Hans Fugal's avatar
      Revert "(wangle) express current Core functionality with a state machine" · 23cf10c5
      Hans Fugal authored
      Summary:
      
      Test Plan:
      
      Reviewed By: harishs@fb.com
      
      Subscribers: net-systems@, fugalh, exa, njormrod, folly-diffs@
      
      FB internal diff: D1633874
      
      Tasks: 5438209
      23cf10c5
    • Hans Fugal's avatar
      fix Future<const T>::value() · f85b2abe
      Hans Fugal authored
      Summary: I'm still a little mystified how one makes a Future<const T> (I tried to make one explicitly in a test and failed), but this is clearly the bug @reedriley sees in https://phabricator.fb.com/D1620805#21
      
      Test Plan:
      fbconfig titan/cachius/test
      fbmake
      
      Reviewed By: reedriley@fb.com
      
      Subscribers: trunkagent, net-systems@, fugalh, exa, njormrod, reedriley, folly-diffs@
      
      FB internal diff: D1630378
      
      Blame Revision: D1620805
      f85b2abe
    • Dave Watson's avatar
      move asyncserversocket to folly · a44155cb
      Dave Watson authored
      Summary:
      Changes:
      * namespace to folly
      * some std::chrono replacesments
      * Moves shutdownSocketSet stuff to thriftserver instead of in the socket itself.
      * Changes exception types.  I don't see anywhere that uses the TAsync*SERVER*socket exceptions depending on the TTransport type, but I could be wrong? I don't really know what to do about the exception types
      
      unittests still postponed overnight.
      
      Test Plan:
      fbconfig -r thrift; fbmake runtests
      fbconfig -r proxygen; fbmake runtests
      
      Reviewed By: dcsommer@fb.com
      
      Subscribers: hphp-diffs@, ps, folly-diffs@, anca, trunkagent, jsedgwick, fugalh, doug, alandau, bmatheny, njormrod
      
      FB internal diff: D1579187
      a44155cb
    • James Sedgwick's avatar
      add PortableSpinLock.h to Makefile, unbreak fbthrift build · 1701e3d7
      James Sedgwick authored
      Summary:
      fix fbthrift build, broken in D1621717
      
      I wonder if it'd be possible to lint against this somehow. The jenkins failures are easy to miss especially on folly diffs with lots of failure noise (in this case it was still postponed)
      
      Test Plan: wait for jenkins
      
      Reviewed By: davejwatson@fb.com
      
      Subscribers: njormrod, folly-diffs@
      
      FB internal diff: D1630833
      1701e3d7
    • Andrii Grynenko's avatar
      Schedule destroyInstances in registrationComplete · 05fbb13d
      Andrii Grynenko authored
      Summary: This makes it more likely that SingletonVaultDestructor won't be created after atexit calls.
      
      Test Plan: unit test
      
      Reviewed By: chip@fb.com
      
      Subscribers: hphp-diffs@, ps, njormrod, folly-diffs@
      
      FB internal diff: D1629804
      
      Tasks: 5353022
      05fbb13d
    • Hans Fugal's avatar
      (wangle) fix after-delete assert · fd915b73
      Hans Fugal authored
      Summary:
      This would cause debug builds to do a bad thing (access the variable `this->detached_` within an assert, after `delete this`).
      
      Test Plan: unit tests
      
      Hopefully now that we have a dummy cpp file in `folly/wangle/detail` contbuild
      will pick it up and all the dependencies will also run their tests.
      Right now, we suspect maybe maelstrom (@wez) and adinvoicer and zookeeper
      (@jying) and probably others are seeing this in unit test failures (esp. if
      they use asan, which is rightly detecting read after free). Hoping contbuild
      will catch them.
      
      Reviewed By: davejwatson@fb.com
      
      Subscribers: net-systems@, fugalh, exa, njormrod, folly-diffs@, wez, dcapel, jying, cgheorghe
      
      FB internal diff: D1630301
      
      Tasks: 5424546, 5435720
      
      Blame Revision: D1618240
      fd915b73
    • Hans Fugal's avatar
      waitFor race workaround · 5aa44fb2
      Hans Fugal authored
      Summary: Fixing the race will take some more thought. Probably a condvar. For now, I'm turning waitFor into a spinlock instead.
      
      Test Plan: new unit test that deadlocks before the workaround
      
      Reviewed By: jsedgwick@fb.com
      
      Subscribers: trunkagent, net-systems@, fugalh, exa, njormrod, folly-diffs@
      
      FB internal diff: D1628015
      
      Tasks: 5427828
      5aa44fb2
    • Hans Fugal's avatar
      (wangle) Fix a couple compilation issues · 4459989b
      Hans Fugal authored
      Summary: If you try to include files in a weird (but not incorrect) order you get compilation errors. No longer!
      
      Test Plan: new dummy `cpp_binary` target
      
      Reviewed By: davejwatson@fb.com
      
      Subscribers: trunkagent, folly-diffs@, net-systems@, fugalh, exa, njormrod
      
      FB internal diff: D1621083
      4459989b
    • Hans Fugal's avatar
      (wangle) Interrupts (and therefore, cancellation) · 831405dc
      Hans Fugal authored
      Summary:
      Modeled very closely after Finagle's interrupts. Compare with https://github.com/twitter/util/blob/master/util-core/src/main/scala/com/twitter/util/Promise.scala if you like.
      The basic idea is the promise holder can register an interrupt handler, and then interrupts will call that handler. A typical handler would fulfil the promise with an exception (or special value) indicating that it was interrupted (if it was interrupted in time).
      Raising an interrupt does not prevent setting a value or callbacks executing or any of that - it is only advisory to the promise holder.
      
      Test Plan: I wrote some unit tests.
      
      Reviewed By: davejwatson@fb.com
      
      Subscribers: folly-diffs@, net-systems@, fugalh, exa, hannesr, njormrod
      
      FB internal diff: D1620805
      
      Tasks: 4618297
      831405dc
    • Hans Fugal's avatar
      (wangle) express current Core functionality with a state machine · 1be516d1
      Hans Fugal authored
      Summary:
      This is a refactor of the current functionality to use a state machine (inheriting from `FSM`). This will make it easier to extend to do cancellation and Future collapsing. Performance is the same, maybe slightly faster (abt 1%). (I might be a little conservative with the atomics, it might be worth going through and reasoning about whether they all need to be atomic).
      
      The state machine is two states, Waiting (no value), and Done (has a value). Transitioning to Done will execute the callback if it exists and we are active. Otherwise the callback will happen when it is set and active is true.
      
      There is a subjective balancing act in place here, between making a state for every single mutable bit of information (which results in an explosion of states: hasValue X hasCallback X isActive X isCancelled …), and finding a sweet spot of expressivity. This isn't too far from the way Twitter did it, though we don't (yet) have all the states they have (and they don't have the concept of hot/cold futures). But I got there by way of replacing the `mutex_` with the state, after changing all those variables to atomics so they didn't need mutex protection (resulting in only `callback_` and `result_` needing it). I expect the state machine will morph as the rest of the functionality is added, but hopefully it will be easier to understand and keep correct (that's the idea anyway).
      
      Test Plan: Tests still pass (and not by accident, I made several awesome mistakes along the way).
      
      Reviewed By: davejwatson@fb.com
      
      Subscribers: net-systems@, fugalh, exa, njormrod
      
      FB internal diff: D1618240
      
      Tasks: 4618297
      1be516d1
    • Hans Fugal's avatar
      (wangle) Core cleanup · 4c7a8438
      Hans Fugal authored
      Summary:
      Just some cleaning hose in `detail::Core`.
      - rename `fulfil` to `setResult`
      - and `value_` to `result_`
      - remove unnecessary helper methods (I can be convinced to keep them if you like them)
      
      Test Plan: mechanical changes, tests still pass
      
      Reviewed By: davejwatson@fb.com
      
      Subscribers: trunkagent, folly-diffs@, net-systems@, fugalh, exa, njormrod
      
      FB internal diff: D1618161
      4c7a8438
    • Hans Fugal's avatar
      (wangle) deprecate Later and ThreadGate · 72984487
      Hans Fugal authored
      Summary:
      Later is now superfluous. Just hold a deactivated future (e.g. one returned by `Future::via`), and then activate (or destruct) it when you're ready.
      ThreadGate has proven to be too rigid and too heavyweight to be really useful. And is superfluous now with `Future::via`. e.g.
      f.via(east).then(a1).then(a2).via(west).then(b1).then(b2);
      
      This is stage one of removing these: mark them deprecated.
      Stage two will be for me to change all existing usages in our code to not use them.
      Stage three will be to rip these out altogether.
      
      Test Plan:
      Everything still builds and works, but now with deprecation warnings.
      
      fbconfig -r \
      common/smc/cpp/tests \
      folly/wangle \
      langtech/audiens \
      messaging/avscan \
      messaging/maelstrom \
      neteng/traffic_manager \
      notifications/nudge/service \
      tao/client \
      zeus/datashuttle
      fbmake runtests
      
      Reviewed By: jsedgwick@fb.com
      
      Subscribers: net-systems@, fugalh, exa, njormrod, folly-diffs@
      
      FB internal diff: D1626412
      
      Tasks: 5409538
      72984487
    • Hans Fugal's avatar
      remove fireAndForget · 410194d1
      Hans Fugal authored
      Summary: It was deprecated, now is unused.
      
      Test Plan:
      fbgs
      check contbuild
      
      Reviewed By: hannesr@fb.com
      
      Subscribers: trunkagent, net-systems@, fugalh, exa, njormrod, folly-diffs@
      
      FB internal diff: D1624221
      410194d1
    • Hans Fugal's avatar
      (wangle) dummy cpp files · 6c03fe98
      Hans Fugal authored
      Summary: for great contbuild
      
      Test Plan: these projects still build. contbuild should start picking them up, based on discussion with @robbert
      
      Reviewed By: robbert@fb.com
      
      Subscribers: trunkagent, net-systems@, fugalh, exa, mwa, jgehring, fuegen, njormrod, folly-diffs@, robbert
      
      FB internal diff: D1624206
      
      Tasks: 5399744
      6c03fe98
    • Hans Fugal's avatar
      (FSM) updateState with unprotected action · 4c68315c
      Hans Fugal authored
      Summary:
      Like the magic macros. As it says in the comment, this can lead to nicer code.
      Also added/moved a couple examples to the top of `test/FSM.cpp`.
      
      Test Plan: new tests
      
      Reviewed By: davejwatson@fb.com
      
      Subscribers: trunkagent, net-systems@, fugalh, exa, njormrod
      
      FB internal diff: D1618184
      4c68315c