Commit Graph

12 Commits (cfe0ba90352c48a2b9f5006c4c8e824dc472cdc9)

Author SHA1 Message Date
Callum Prentice 24625c7898 Nat's suggested improvement to LLThreadSafeQueue that takes account of queue being empty as well as the status flag condition 2020-07-28 21:46:21 +03:00
Nat Goodspeed a07553c224 DRTVWR-476: Add LLThreadSafeQueue::tryPushFrontFor().
tryPushFrontFor() is pushFront() with a std::chrono::duration timeout.
2020-05-20 10:32:30 -04:00
Nat Goodspeed 98dfba0d2f DRTVWR-476: Wrap boost::fibers::mutex et al. with LLCoros aliases.
Specifically:

LLCoros::Mutex means boost::fibers::mutex
LLCoros::LockType means std::unique_lock<boost::fibers::mutex>
LLCoros::ConditionVariable means boost::fibers::condition_variable
LLCoros::cv_status means boost::fibers::cv_status

So as not to drag in all of boost::fibers::mutex.hpp or condition_variable.hpp
for each consumer of llcoros.h, instead #define LLCOROS_MUTEX_HEADER and
LLCOROS_CONDVAR_HEADER. Those who need them can #include the relevant macro.

Update llcond.h and llthreadsafequeue.h accordingly.
2020-05-14 14:51:52 -04:00
Nat Goodspeed 5c92047e82 DRTVWR-476: Introduce LLThreadSafeQueue::close().
Also isClosed() and explicit operator bool() to detect closed state.

close() causes every subsequent pushFront() to throw
LLThreadSafeQueueInterrupt. Once the queue is drained, it causes popBack() to
throw likewise.
2020-03-25 19:25:42 -04:00
Nat Goodspeed af35391114 DRTVWR-476: Make LLThreadSafeQueue coroutine-safe as well. 2020-03-25 19:07:22 -04:00
Nat Goodspeed b080b06b42 DRTVWR-494: Encapsulate redundant VS boilerplate around <mutex>. 2020-03-25 15:28:17 -04:00
andreykproductengine 8a92a771ba SL-10291 Replace apr thread with standard C++11 functionality 2019-01-15 22:27:28 +02:00
Nat Goodspeed 9c49a6c91d MAINT-5011: Introduce LLException base class for viewer exceptions.
This also introduces LLContinueError for exceptions which should interrupt
some part of viewer processing (e.g. the current coroutine) but should attempt
to let the viewer session proceed.

Derive all existing viewer exception classes from LLException rather than from
std::runtime_error or std::logic_error.

Use BOOST_THROW_EXCEPTION() rather than plain 'throw' to enrich the thrown
exception with source file, line number and containing function.
2016-07-19 16:25:25 -04:00
Oz Linden c8726aba30 remove execute permission from many files that should not have it 2015-11-10 09:48:56 -05:00
Graham Madarasz bf6182daa8 Update Mac and Windows breakpad builds to latest 2013-03-29 07:50:08 -07:00
brad kittenbrink e87b447a0c Fix for dll linkage errors. 2010-11-09 17:42:13 -08:00
Andrew A. de Laix 9ae2891a3a start of a thread safe queue 2010-11-09 15:04:44 -08:00