Vinnie Falco
3fbff6e620
beast cleanup and tidying:
...
* Replace custom types with C++11 <cstdint> types
* Fix sqlite integer intos and uses
* Fix String implicit integer constructors
* Escape the enclosing namespace in sqdb
* Replace contract checks with assert
* Make many header files compile independently
* Remove the dependence on beast_core.h in many places
* Remove unused or obsolete classes and functions
* Remove unused or obsolete macros
* Remove unused network functions and files
* Remove unused or obsolete classes:
- ChildProcess
- HighResolutionTimer
- InterProcessLock
- Throw
- TrackedMutex
- UntrackedMutex
- XmlDocument
- XmlElement
2014-03-23 15:23:55 -07:00
Vinnie Falco
f63cf33118
New unit_test framework:
...
* Header-only!
* No external dependencies or other beast modules
* Compilation options allow for:
- Stand-alone application to run a single test suite
- Stand-alone application to run a set of test suites
- Global suite of tests inline with the host application
- Disable test suite generation completely
* Existing tests reworked to use the new classes
2014-03-21 18:00:37 -07:00
Vinnie Falco
2d490f6e6a
beast cleaning and tidying:
...
* Consolidate small modules into one
* Remove Android-specific platform support
* Remove Chrono.h from beast_core.h
* Removed files:
- TypeTraits.h
- Utility.h
- Net.h
- Asio.h
* Remove zlib support:
- Remove inline zlib library sources
- Remove GZIPCompressorOutputStream
- Remove GZIPDecompressorInputStream
* Remove obsolete or unused classes:
- AbstractObject
- BigInteger
- BufferedInputStream
- CacheLine
- CPUMeter
- DatagramSocket
- DynamicObject
- FileLogger
- FPUFlags
- Identifier
- JSON
- LocalisedStrings
- MACAddress
- MemoryAlignment
- MemoryInputStream
- MemoryMappedFile
- NamedValueSet
- OptionalScopedPointer
- PerformanceCounter
- PropertySet
- ScopedTimeInterval
- SparseSet
- SpinDelay
- StreamingSocket
- StringPool
- SubregionStream
- Uuid
- Variant
2014-03-21 07:30:50 -07:00
Howard Hinnant
d580e7c694
General tidy and refactoring:
...
* Use nullptr (C++11) instead of NULL.
* Put each file into its own namespace declaration.
* Remove "using namespace" directives and add scope qualifiers.
* Control when beast's implementation of std::equal (C++14) is used.
* Tidy up some const declarations.
Conflicts:
src/ripple_app/shamap/SHAMapSync.cpp
src/ripple_app/tx/TransactionEngine.cpp
2014-03-19 13:42:01 -07:00
Vinnie Falco
d4a5c0353d
beast, beast::asio improvements and fixes:
...
* New maybe_const_t alias for maybe_const
* New asio::enable_wait_for_async for safe cleanup
* New asio::memory_buffer, a managed boost::asio compatible buffer
* shared_handler improvements:
- Can be 'empty' (no stored handler).
- Default constructible as 'empty'.
- Safe evaluation in bool contexts, false==empty
* Fix is_call_possible metafunction:
- Works on empty argument lists
- Works with reference types
* Replace SafeBool idiom with C++11 explicit operator bool
* Move IPAddress function definitions to the header
* Move cyclic_iterator to container/
* Remove unused BufferType
* Remove obsolete classes:
- NamedPipe
- ReadWriteLock
- ScopedReadLock
- ScopedWriteLock
- LockGuard
2014-03-17 17:40:55 -07:00
Vinnie Falco
f603ae175b
Add chrono APIs to DeadlineTimer
2014-02-12 12:58:20 -08:00
Vinnie Falco
496b337b27
General refactoring, using C++11
...
* Remove broken RecycledObjectPool
* Fix beast::ServiceQueue using List instead of LockFreeStack
* Add class semaphore, fixes broken Semaphore
* Move crytpo module files to new beast directory
* Use c++11 replacements for boost and beast types:
- std::atomic instead of beast::Atomic
- std::function instead of boost::function, beast::function
- std::unique_ptr instead of beast::ScopedPointer
- std::shared_ptr instead of boost::shared_ptr
* Remove modules:
- beast_db
- beast_crypto
- beast_extras
* Remove unnecessary classes:
- AbstractFifo
- AddConst
- AtomicCounter
- AtomicFlag
- AtomicPointer
- AtomicState
- CopyConst
- Expression
- ForwardList
- IfCond
- Interval
- IntrusiveArray
- KeyvaDB
- PointerToOther
- PointerTraits
- RemoveConst
- RemoveConstVolatile
- RemoveReference
- RemoveVolatile
- SharedObjectArray
- SingleThreadedSharedObject
- SophiaDB factory
- SortedSet
- WeakReference
- beast::unique_ptr
2014-01-07 15:57:45 -08:00
Vinnie Falco
9e5619ce99
Fix Workers thread name
2013-11-22 15:51:20 -08:00
Vinnie Falco
1f97a239dc
Measure CPU usage in Workers
2013-10-22 17:23:54 -07:00
Vinnie Falco
49bc04fa48
Make List<>::Node not uncopyable
2013-10-17 17:46:18 -07:00
Vinnie Falco
6c7f5d093c
Move many Thread related classes
2013-10-04 14:34:01 -07:00
Vinnie Falco
ca47d72aee
Move ServiceQueue, ThreadLocalValue, SpinLock
2013-10-04 14:34:00 -07:00
Vinnie Falco
5831a53697
Remove Journal from most Stoppable overrides
2013-10-04 14:33:57 -07:00
Vinnie Falco
ac37c38133
Beast class refactor
2013-10-03 19:03:10 -07:00
Vinnie Falco
1dfd655959
Use RelativeTime from startup in DeadlineTimer
2013-10-03 18:36:53 -07:00
Vinnie Falco
4394594518
Tidy up some use of Error for throw
2013-09-28 19:34:16 -07:00
Vinnie Falco
f07515eb88
Add Stoppable prepare and start interfaces
2013-09-28 15:30:01 -07:00
Vinnie Falco
cc05ce19f9
Add ServiceQueue
2013-09-28 15:09:10 -07:00
Vinnie Falco
3acb474795
Add SharedData::ConstAccess
2013-09-28 15:09:08 -07:00
Vinnie Falco
5f231d305f
Update copyright notice and licenses
2013-09-25 17:27:06 -07:00
Vinnie Falco
fbc247bf53
Add Stoppable to beast
2013-09-22 11:51:46 -07:00
Vinnie Falco
9d9c822efb
Migrate some headers and general tidying
2013-09-22 11:51:44 -07:00
Vinnie Falco
9534516b42
Add some thread classes and fix SharedData with a simple mutex adapter
2013-09-21 16:58:55 -07:00
Vinnie Falco
755ab36f0d
Make CallQueue unit test runManual
2013-09-20 01:12:21 -07:00
Vinnie Falco
7b1352d9c5
Add InterruptibleThread unit test
2013-09-19 14:42:55 -07:00
Vinnie Falco
68cf7599d8
ThreadWithCallQueue unit test adjustment
2013-09-19 14:42:55 -07:00
Vinnie Falco
34fffca202
Rename beast sources for consistency
2013-09-19 14:42:51 -07:00
Vinnie Falco
4e59ab2261
Add CallQueue unit test
2013-09-19 14:42:50 -07:00
Vinnie Falco
d5ece4e909
Remove unused and broken classes
2013-09-19 14:42:49 -07:00
Vinnie Falco
39f13beaf7
Remove unused ConcurrentObject
2013-09-19 14:42:48 -07:00
Vinnie Falco
37624a7303
Add ThreadWithCallQueue unit test
2013-09-19 14:42:47 -07:00
Vinnie Falco
001997e088
Fix leak on exit from Singleton dependency cycle
2013-09-17 17:47:06 -07:00
Vinnie Falco
83b9d22ff0
Rename to DeadlineTimer::cancel()
2013-09-17 17:47:05 -07:00
Vinnie Falco
77874ee518
Use new instead of ::new for placement
2013-09-17 17:47:05 -07:00
Vinnie Falco
2dc25cec72
Fix DeadlineTimer, callback while holding lock
2013-09-17 14:13:27 -07:00
Vinnie Falco
8e7e3b7256
Allow negative relative expirations in DeadlineTimer
2013-09-12 18:07:57 -07:00
Vinnie Falco
02acf7d6d0
General refactoring of beast framework classes
2013-09-12 10:55:24 -07:00
Vinnie Falco
f0acc9c901
Reduce the max threads in the Workers unit test
2013-09-12 05:46:45 -07:00
Vinnie Falco
55447b05ac
New SharedSingleton, resolves destruction of objects with static storage duration.
2013-09-12 05:38:39 -07:00
Vinnie Falco
41eb8a1e29
Remove deprecated SharedPtr::getObject
2013-09-12 04:47:03 -07:00
Vinnie Falco
270ceb7ceb
Defer DeadlineTimer callback until the lock is released
2013-09-07 21:20:13 -07:00
Vinnie Falco
19d05b8024
Tidy up contract checks in InterruptibleThread
2013-09-07 11:53:38 -07:00
Vinnie Falco
718569d6a1
Fix DeadlineTimer for InterruptibleThread::wait timeout
2013-09-06 21:45:41 -07:00
Vinnie Falco
a56c01d044
Fix DeadlineTimer for InterruptibleThread::wait timeout
2013-09-06 21:44:53 -07:00
Vinnie Falco
04a4219a75
Make bassert fatal
2013-09-06 21:29:16 -07:00
Vinnie Falco
201221253d
Refactor SharedPtr and fix ContainerDeletePolicy bug
2013-09-05 04:22:26 -07:00
Vinnie Falco
b0503691c5
Fix bug and tidy up DeadlineTimer
2013-09-04 15:17:22 -07:00
Vinnie Falco
de2c4cc7b8
Added DynamicArray, DynamicList, and HashMap
2013-09-03 08:31:16 -07:00
Vinnie Falco
d9d291abcb
Tidy up includes and header material
2013-08-30 17:33:33 -07:00
JoelKatz
5acd433080
Fix another regression.
2013-08-27 01:49:46 -07:00