Age | Commit message (Collapse) | Author |
|
|
|
It feels wrong to return a dumb LLInstanceTracker subclass* from getInstance()
when we use std::shared_ptr and std::weak_ptr internally. But tweak consumers
to use 'auto' or LLInstanceTracker::ptr_t in case we later revisit this
decision.
We did add a couple get() calls where it's important to obtain a dumb pointer.
|
|
|
|
ThreadSafeSchedule::tryPopUntil() (and therefore tryPopFor()) was simply
delegating to LLThreadSafeQueue::tryPopUntil(), with an adjusted timeout since
we want to wake up as soon as the head item, if any, becomes ready. But then
we have to loop back to retry the pop to actually deal with that head item.
In addition, ThreadSafeSchedule::popWithTime() was spinning rather than
properly blocking on a timed condition variable. Fixed.
|
|
ThreadSafeSchedule orders its items by timestamp, which can be passed either
implicitly or explicitly. The timestamp specifies earliest delivery time: an
item cannot be popped until that time.
Add initial tests.
Tweak the LLThreadSafeQueue base class to support ThreadSafeSchedule:
introduce virtual canPop() method to report whether the current head item is
available to pop. The base class unconditionally says yes, ThreadSafeSchedule
says it depends on whether its timestamp is still in the future.
This replaces the protected pop_() overload accepting a predicate. Rather than
explicitly passing a predicate through a couple levels of function call, use
canPop() at the level it matters. Runtime behavior that varies depending on
an object's leaf class is what virtual functions were invented for.
Give pop_() a three-state enum return so pop() can distinguish between "closed
and empty" (throws exception) versus "closed, not yet drained because we're
not yet ready to pop the head item" (waits).
Also break out protected tryPopUntil_() method, the body logic of
tryPopUntil(). The public method locks the data structure, the protected
method requires that its caller has already done so.
Add chrono.h with a more full-featured LL::time_point_cast() function than the
one found in <chrono>, which only converts between time_point durations, not
between time_points based on different clocks.
|
|
Instead, break out a separate pop_() method that explicitly provides the
lambda to the real pop_() implementation.
|
|
Add LL::PriorityQueueAdapter, a wrapper for std::priority_queue to make its
API more closely resemble std::queue for drop-in use as LLThreadSafeQueue's
underlying QueueT container.
Support move-only element types.
Factor out some implementation redundancy: wrap actual push semantics as
push_(), actual pop semantics as pop_(). push(), tryPush() and tryPushUntil()
now call push_(); pop(), tryPop() and tryPopUntil() now call pop_().
Break out tryLock() and tryLockUntil() methods that, if they can lock, run the
passed callable. Then tryPush(), tryPushUntil(), tryPop() and tryPopUntil()
pass lambdas containing the meat of the original method body to tryLock() or
tryLockUntil(), as appropriate.
|
|
Push autobuild updates made in DRTVWR-541 into -546
|
|
These functions allow prepending or removing an item at the left end of an
arbitrary tuple -- for instance, to add a sequence key to a caller's data,
then remove it again when delivering the original tuple.
|
|
First, parameterize LLThreadSafeQueue's queue type. This allows us to
substitute (e.g.) a std::priority_queue for a particular instance.
Use std::queue for the default queue type, changing the operations invoked on
the queue type from std::deque methods to std::queue methods.
Rename published methods from (e.g.) pushFront() and popBack() to simple
push() and pop(), retaining legacy names as aliases. Not only are the overt
Front and Back unnecessary; they're the opposite of how std::queue uses
std::deque or std::list, so they only confuse the reader.
Break out tryPushUntil() method. We already use that logic internally to
tryPushFor(), so it's just as easy to publish it as its own entry point.
Add tryPopFor() and tryPopUntil() to allow limiting the time we'll wait for a
queue item to become available.
|
|
DRTVWR-546
|
|
Fortunately we already have platform-independent wrappers in llmemory.h.
|
|
|
|
This reverts commit 203ea3a70a775a09cbbffb1740ab7c58f1780baa, reversing
changes made to 8e3f0778863a5aa337d1148a243ea91d238a8ac5.
# Conflicts:
# indra/newview/llmachineid.cpp
|
|
because it causes frame stalls while logging.
|
|
|
|
|
|
# Conflicts:
# indra/llcommon/linden_common.h
|
|
|
|
|
|
|
|
|
|
bugsplat shows KERNELBASE!RaiseException and flush() insread of forceErrorLLError, function crashes too early.
|
|
|
|
number of per-frame lookups to said map.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
to tracy.lib
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Conflicts:
# indra/newview/llappviewer.cpp
# indra/newview/llappviewerwin32.cpp
# indra/newview/llmachineid.cpp
|
|
to tracy.lib
|
|
|
|
|
|
|
|
# Conflicts:
# autobuild.xml
# build.sh
# indra/CMakeLists.txt
# indra/newview/CMakeLists.txt
# indra/newview/llappviewermacosx.cpp
# indra/newview/llappviewerwin32.h
# indra/newview/viewer_manifest.py
# indra/win_crash_logger/llcrashloggerwindows.cpp
|
|
|
|
|
|
|
|
# Conflicts:
# autobuild.xml
# indra/llcommon/llerror.cpp
# indra/llui/llnotifications.h
# indra/newview/llappviewer.cpp
# indra/newview/llappviewermacosx.cpp
|
|
|
|
|