mirror of
https://git.tesses.org/tesses50/crosslang.git
synced 2026-10-01 17:14:13 +00:00
Compare commits
1
Commits
c1c3d02bf0
...
v0.0.10
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4aab28411a |
+2
-3
@@ -113,9 +113,8 @@ void GC::Start() {
|
||||
this->thrd = new Thread([this]() -> void {
|
||||
while (this->IsRunning()) {
|
||||
this->BarrierBegin();
|
||||
while (this->allocs < ALLOC_THRESHOLD)
|
||||
this->cond.Wait(
|
||||
&this->mtx); // your wrapper around pthread_cond_wait
|
||||
while (this->IsRunning() && (this->allocs < ALLOC_THRESHOLD))
|
||||
this->cond.Wait(&this->mtx);
|
||||
this->allocs = 0;
|
||||
std::vector<THeapObject *> to_delete;
|
||||
this->Collect(to_delete);
|
||||
|
||||
Reference in New Issue
Block a user