| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
We use a third-party implementation of std::variant on platforms that do
not include it. This change simply upgrades the third-party source to
the most recent release and then fixes the way we actually depend on it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Stack trace unit tests were failing with TSAN due to the mechanisms and
assumptions of the tests. In one case, we simulate a real failure and do
some thread necromancy to recover from it, which was causing TSAN to
segfault immediately. In another two, we rely on a feature that makes
some assumptions about which threads are running and what signals they
can receive, which TSAN's internal threads violate. These tests and
features are disabled with TSAN for now so we can run further tests with
TSAN.
Separately, one of the tests was failing with a complaint from TSAN that
errno was being stomped on. That is also addressed.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
The `stdx::set_terminate` primitive, on windows, wraps the per-thread
terminate handler and emulates a single global terminate handler.
|
|
|
|
| |
Added a test to check that this happens.
|
|
|
|
|
|
| |
`MONGO_COMPILER_NOINLINE`
Also removed the `PACKED_DECL`, since it isn't used.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
condition_variable::_runWithNotifyable allocates a linked list member
for the notification list per invocation. It also does this under both
the condvar mutex as well as the mutex for the predicate waiter.
Two things need to happen for this:
* notifyables need to own a std::list<Notifyable*>
* NotInterruptible needs to be a thread local
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Operation context currently relies on an elaborate dance between the
client lock, _waitMutex, _waitCV and _numKillers to allow markKilled to
tap the condvar an opctx is waiting on.
After the introduction of batons on all opctx's, this is no longer
necessary (as batons have their own support for being woken, while
waiting on a condvar). Removing the special killing code will simplify
opctx, and remove a lot of extra book keeping.
|
|
|
|
|
|
| |
Remove leading comments that are just stating the filename.
Move any file-level comments below the copyright banner.
Remove leading blank lines.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
hash map/set.
Remove stdx::unordered_multimap and multiset.
Custom hashers to stdx::unordered_map are not trusted by default, we
will rehash the produced hash with absl again to ensure we have a good
hash function.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add support for a generalized interruptibility facility in the server.
This offers a generalized interruptibility facility, trialed in
Future<T> and ProducerConsumerQueue<T>.
It offers 3 major concepts:
Notifyable: A type which can notified off-thread, causing a wake up
from some kind of blocking wait
Waitable: A type which is Notifyable, and also can perform work while in
a ready-to-receive notification state. static methods offer support for
running underneath condition_variable::wait's. The chief implementer is
the transport layer baton type
Interruptible: A type which can wait on condition variables, and offers:
- deadlines. This means the type integrates some sort of clock source
- interruptibility. This means the type offers a way of noticing
that it should no longer run via status or exception
Additionally, Interruptible's offer special scoped guards which
offer
- Exemption from interruption in a region defined by the lifetime
of a guard object
- Subsidiary deadlines which can trigger recursively, offering
specialized timeout and status return support.
The series of virtual types allows us to slice the interface between
opCtx and future such that opctx can use future and future can use
opctx. Additionally, cutting out more functionality allows us to flow a
noop interruptibility type which unifies our waiting behind a common
api.
|
|
|
|
|
|
|
| |
The `mongo::unique_function` object is a move-only function object
which is useful for capturing move-only lambdas (such as those
with `std::unique_ptr` objects) into type-erased function objects
that resemble `std::function`.
|
| |
|
| |
|
| |
|
|
|
|
| |
two modes similar while still allowing customization in the execution. Should fix some perf regressions that came with unifying the service state machine.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
There are a lot of template metaprograms and `std::enable_if` expressions
which we'd like to use in our codebase. This import of a C++17 future
feature will help make them easier to write.
|
|
|
|
| |
Enjoy the C++14! 😀 ❤️ thank you!
|
| |
|
| |
|
| |
|
|
|
|
|
| |
On Windows, these are aliases for boost containers. On
other platforms they are aliases for std containers.
|
|
|
|
|
|
|
|
|
| |
Instead of aliasing std::thread for stdx::thread, we wrap std::thread in
an api compatible version which std::terminates if std::thread's
constructor throws. Given that we don't have a good strategy for
re-trying thread creation failures, this improves our stack traces, as
we can see which part of the code failed to create a thread, rather than
getting a generic error at the top of the stack.
|
| |
|
|
|
|
| |
Also adds SecureT, a wrapper proxy for newing objects on the secure heap.
|
| |
|
|
|
|
|
|
| |
While std::function has some broken edge cases on VS2013, so does
boost::function in boost 1.56. Rather than upgrade boost, use MSVC's
std::function and fix up the few places that need adjustment.
|
| |
|
| |
|
| |
|