1. 18 Aug, 2018 1 commit
  2. 15 Jul, 2018 1 commit
  3. 11 Jan, 2018 1 commit
    • Kenton Varda's avatar
      Replace all include guards with #pragma once. · 677a52ab
      Kenton Varda authored
      @kloepper pointed out a while back that every compiler you've ever heard of supports this. Plus, it's more concise, it's not prone to copy-paste errors, and it looks nicer.
      
      At the time I wanted to remain consistent and I didn't feel like spending the time to update all my existing code. But, every time I've added a new header since I've cursed the include guard, so I finally broke down and changed it.
      677a52ab
  4. 22 Sep, 2017 1 commit
  5. 21 Sep, 2017 1 commit
    • Kenton Varda's avatar
      Add WaitScope::poll() and Promise::poll() to pump all events. · ece2a1aa
      Kenton Varda authored
      These are useful in unit tests. Often, some tasks have been queued, and we want to test that a particular thing happens or doesn't happen as a result of those tasks, without actually waiting on any specific promise. We need a way to run the event queue until it is empty. For that, we add WaitScope::poll().
      
      Or, sometimes, we want to check if a specific promise is (or is not!) resolved as a result of the tasks that have been queued so far, but we may not want to actulaly wait() on it for a couple reasons:
      - We may actually want to verify that the promise is *not* resolved by tasks so far. wait()ing on it would be expected to deadlock.
      - We may expect the promise to resolve, but would prefer not to deadlock if it doesn't resolve (we'd rather fail fast).
      
      For this, we add Promise::poll().
      
      There are lots of tests I've written which could be simplified by this, but for now I'm not refactoring any existing tests.
      
      Note that adding these (particularly Promise::poll()) required updating the async framework a bit, in that this is the first case where PromiseNode::onReady() might be called multiple times, or might be canceled without destroying the PromiseNode entirely. Luckily this was not hard to account for. (We still have the rule that get() can only be called once, though.)
      ece2a1aa
  6. 07 Apr, 2017 1 commit
  7. 24 Jan, 2017 1 commit
  8. 07 Oct, 2016 1 commit
  9. 02 Oct, 2016 1 commit
  10. 30 Mar, 2016 1 commit
  11. 05 May, 2015 1 commit
  12. 25 Apr, 2015 1 commit
  13. 19 Feb, 2015 2 commits
    • Kenton Varda's avatar
      Fix #182. · 55ab49d0
      Kenton Varda authored
      55ab49d0
    • Kenton Varda's avatar
      Add various convenience features to async APIs: · bb386f1b
      Kenton Varda authored
      - Promise<T>::catch_() method which is equivalent to then() but you only specify an error handler; the non-error continuation is the identity function.
      - kj::evalNow() function which synchronously calls a function and returns a promise for the result, or a broken promise if the function threw an exception. This is convenient for making sure exceptions get pushed into the promise chain.
      - KJ_WARN_UNUSED_RESULT on various methods that return promises.
      bb386f1b
  14. 29 Dec, 2014 2 commits
  15. 29 Nov, 2014 1 commit
    • Kenton Varda's avatar
      Simplify exceptions. Eliminate Durability. Rename Nature to Type and simplify it. · 4ee25e43
      Kenton Varda authored
      Distinguishing between "local bugs" and "preconditions" was proving difficult in practice, because a precondition failure in one function may very well indicate a bug in a calling function, but the exception may be thrown through that function, thus when caught the classification is nonsensical. The distinction also was not as useful as imagined. So, I eliminated this distinction.
      4ee25e43
  16. 22 Nov, 2014 1 commit
  17. 19 Aug, 2014 1 commit
  18. 20 Jun, 2014 1 commit
    • Kenton Varda's avatar
      Change license to MIT. · 889204fe
      Kenton Varda authored
      For portions currently copyright by Kenton (most of it), transfer copyright to Sandstorm Development Group, Inc. (Kenton's company).
      
      The license change is practically meaningless, as MIT and BSD 2-clause are legally equivalent. However, the BSD 2-clause license is sometimes confused for its ugly siblings, BSD 3-clause and BSD 4-clause. The MIT license is more immediately recognizeable for what it is.
      
      Rémy Blank and Jason Choy (the two non-trivial contributors) are on record as approving this change:
      
      https://groups.google.com/d/msg/capnproto/xXDd2HUOCcc/gbe_COIuXKYJ
      889204fe
  19. 22 Jan, 2014 1 commit
  20. 10 Dec, 2013 1 commit
  21. 06 Dec, 2013 1 commit
  22. 05 Dec, 2013 2 commits
  23. 04 Dec, 2013 1 commit
  24. 30 Nov, 2013 3 commits