aboutsummaryrefslogtreecommitdiff
path: root/src/zencore/thread.cpp
Commit message (Collapse)AuthorAgeFilesLines
* speed up tests (#555)Dan Engelbrecht2025-10-061-3/+3
| | | | | | | | | | | | * faster FileSystemTraversal test * faster jobqueue test * faster NamedEvent test * faster cache tests * faster basic http tests * faster blockstore test * faster cache store tests * faster compactcas tests * more responsive zenserver launch * tweak worker pool sizes in tests
* Merge remote-tracking branch 'origin/main' into de/zen-service-commandLiam Mitchell2025-08-211-4/+6
|\
| * de/stringbuilder safety (#456)Dan Engelbrecht2025-08-051-4/+6
| | | | | | | | | | | | - Improvement: Safeguard FormatCallstack to not throw exceptions when building the callstack string - Improvement: Limit thread name length when setting it for debugger use - Improvemnet: Don't allow assert callbacks to throw exception - Improvement: When formatting log output for malformed attachments in a package message, allow the string buffer to grow instead of throwing exception
* | systemd unit file, incompleteDan Engelbrecht2025-01-151-1/+1
|/
* reduce memory churn (#248)Stefan Boberg2024-12-021-1/+4
| | | | | * eliminated allocation in SetCurrentThreadName * reduced memory allocator activity in cache RPC response building * reduced allocations in compact binary building
* memory/string support cleanup and additions (#220)Stefan Boberg2024-11-191-2/+4
| | | | | | | | | * removed unused memory classes * added align.h alignment helpers used in upcoming changes * added char16_t StringLength * avoid memory alloc in SetCurrentThreadName * added command line parsing helpers to zencore/commandline.h * removed IoBuffer direct VirtualAlloc path
* safer path from handle (#195)Dan Engelbrecht2024-10-161-2/+10
| | | * remove PathFromHandle that throws to give better context on failures
* zenserver process launch/termination improvements (#138)Dan Engelbrecht2024-08-271-3/+10
| | | | | | * zenserver process launch/termination improvements * fix GetPidStatus to return error code on Linux * fix linux FindProcess() * cleanup IsZombieProcess
* miscellaneous minor bugfixes (#66)v5.5.0Stefan Boberg2024-04-261-4/+3
| | | | | | | | this change addresses some TSAN warnings for improved robustness and less TSAN noise - Added dedicated timer for EnqueueStateExitFlagTimer - Made log formatter `fullformatter` output consistent time stamps across threads - Made Linux/Mac event implementation TSAN clean
* zenserverprocess hardening (#61)Dan Engelbrecht2024-04-251-0/+3
| | | | * verify running process before creating event * make sure we don't signal/wait for a zenserver instance that we did not wait for to get ready
* various TSAN/ASAN/LeakAnalyzer fixes (#622)Stefan Boberg2023-12-191-3/+10
| | | | | | | | | * fix JobQueue test threading issue. The inner job queued with `QueueJob` would reference `I` from inside the captured closure which would subsequently disappear * made sure application exit is thread safe * don't try to access string data out of bounds * keep-alive flag is accessed from multiple threads * fix memory leaks in Zen upstream client code * TSAN fixes for Event
* moved process handling code into separate h/cpp (#555)Stefan Boberg2023-11-201-667/+13
|
* fix named event (#553)Dan Engelbrecht2023-11-171-6/+7
| | | * fix named event timout and test, fix blocking queue
* blocking queue fix (#550)Dan Engelbrecht2023-11-161-14/+1
| | | | | | | | | * make BlockingQueue::m_CompleteAdding non-atomic * ZenCacheDiskLayer::Flush logging * name worker threads in ZenCacheDiskLayer::DiscoverBuckets * name worker threads in gcv2 * improved logging in ZenServerInstance * scrub threadpool naming * remove waitpid handling, we should just call wait to kill zombie processes
* further posix event improvements (#549)Stefan Boberg2023-11-161-6/+23
| | | | | | | | * changed posix event implementation to use std::atomic instead of volatile * ensure Event::Close() can take lock before deleting the inner object * don't try to take the Event lock if the event is already signaled * changed logic around Event::Wait without time-out. this works around some apparent issues on MacOS/Linux * fix logic for posix process exit wait
* changed posix event implementation to use std::atomic instead of volatile (#547)Stefan Boberg2023-11-161-9/+9
|
* don't do blocking call to waitpid (#540)Dan Engelbrecht2023-11-151-35/+3
| | | | fix process wait timeout always use kill(pid, 0) to determine if process is running
* fix race contdition when signaling shutdown of process and waiting for ↵Dan Engelbrecht2023-11-151-8/+48
| | | | completion (#539)
* gc v2 tests (#512)Dan Engelbrecht2023-11-061-3/+3
| | | | | | | | | | * set MaxBlockCount at init * properly calculate total size * basic blockstore compact blocks test * correct detection of block swap * Use one implementation for CreateRandomBlob * reduce some data sets to increase speed of tests * reduce test time * rename BlockStoreCompactState::AddBlock -> BlockStoreCompactState::IncludeBlock
* minor fixes to zencore (#457)Stefan Boberg2023-10-091-2/+0
| | | | * AssertException constructor should be explicit * removed pragma comment
* make sure trace::ThreadRegister is inside ZEN_WITH_TRACEDan Engelbrecht2023-08-221-1/+2
|
* update vcpkg dependencies (#356)Dan Engelbrecht2023-08-111-0/+1
| | | | | | * bump vcpkg version * fmt lib 10 fixes * xmake dependencies (with linux workarounds) * changelog
* * Added Guid::FromStringStefan Boberg2023-06-301-0/+2
| | | | | | | * Added LoadCompactBinaryObject from file to compactbinaryfile.cpp/h * Added SaveCompactBinary(BinaryWriter& Ar, ...) functions * Added ZEN_PLATFORM_NAME define * Added SystemMetrics functionality to query system properties (see zencore/system.h)
* Fix IsProcessRunning on Windows (#335)zousar2023-06-271-1/+12
| | | | IsProcessRunning on Windows would only consider if we could get a handle to a process. It is possible to get a handle to a process even if it is terminated in Windows. To actually know if the process is running, a further call to GetExitCodeProces is required. Addressing this issue ensures that the ZenServerState::Sweep method doesn't keep terminated processes in the state table.
* added GetProcessIdStefan Boberg2023-06-161-0/+10
| | | | this enables mapping the result of a CreateProc call to an integer pid
* added benchmark utility command `bench` (#298)Stefan Boberg2023-05-161-0/+19
| | | currently this implements a way (`zen bench --purge`) to purge the standby lists on Windows. This basically flushes the file system cache and is useful to put your system in a consistent state before running benchmarks
* SetCurrentThreadName now sets thread name in traceStefan Boberg2023-05-151-10/+14
|
* 247 complete httpclient implementation (#269)Stefan Boberg2023-05-051-4/+4
| | | | | | | | | * implemented HttpClient connection pooling * implemented missing verbs * added response helpers (CbObject/CbPackage/text) * added RwLock::WithSharedLock and RwLock::WithExclusiveLock * added some noexcept annotations on RwLock * removed CPR dependency in httpclient.h
* moved source directories into `/src` (#264)Stefan Boberg2023-05-021-0/+1212
* moved source directories into `/src` * updated bundle.lua for new `src` path * moved some docs, icon * removed old test trees