aboutsummaryrefslogtreecommitdiff
path: root/src/zencore/thread.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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