| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
in unit tests with Service Context
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Interruptible and Mutex
This commit:
- Adds Listener hooks for Interruptible
- Expands Listener hooks for Mutex
- Updates the DiagnosticInfo and its tests to use the new hooks
- Removes stacktracing pieces from DiagnosticInfo and its tests
- Removes mongo::ConditionVariable entirely in favor of Interruptible
|
| |
|
| |
|
|
|
|
|
|
| |
Remove leading comments that are just stating the filename.
Move any file-level comments below the copyright banner.
Remove leading blank lines.
|
|
|
|
|
| |
improve the ProduceConsumerQueue's popMany and popManyUpTo to return a
deque, rather than writing to an output iterator.
|
|
|
|
|
|
| |
Add support for MultiProducer + MultiConsumer on our existing PCQ and
introduce a Pipe type which holds the interface via shared_ptr ends and
closes those ends on destruction.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
every unit test.
This patch does several loosely related and surprisingly hard to separate things.
1.) Make the ServiceContext class final
2.) Create a mechanism, called ConstructorActions, for running methods on
ServiceContexts immediately after they're built and immediately before they're
destroyed.
3.) Introduce / improve test fixture base classes for tests, giving them fresh
ServiceContext instances for each test case. There is one fixture for tests that
need a storage engine and another for those that do not.
4.) Make several remaining global variables SC decorations in support of (3)
5.) Replace many MONGO_INITIALIZERS that access getGlobalServiceContext with the
new constructor-actions system, which is needed for (3.)
6.) Fix up tests to use the fixtures from (3) and fix tests that silently used
different service contexts in together in a technically illegal fashion that now
breaks.
7.) Utilize (2) as necessary to simplify initialization of new ServiceContexts,
simplifying the fixtures in (3).
|
|
Add a bounded, interruptible, thread safe, single producer,
multi-consumer queue to the utility directory.
|