diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-07-02 17:41:57 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-07-02 17:46:57 +0200 |
commit | cf1265e188e876dda906dca0029248a06dc80c33 (patch) | |
tree | 92f5fa7a56f991274b77e005f04275813561d45b /src/core/unit.c | |
parent | d0af76e68a5bab2e4fd9674b1c64a9f38d7afe97 (diff) |
core: make GC more aggressive
Since we should allow registering/unregistering transient units with the
same name in a tight-loop, we need to make the GC more aggressive, so
that dead units are cleaned up immediately instead of later.
hence, execute the GC sweep on every event loop iteration and clean up
units. This of course, means we need to be careful with adding units to
the GC queue, which we already are since we execute check_gc() of each
unit type already when adding something to the queue.
Diffstat (limited to 'src/core/unit.c')
-rw-r--r-- | src/core/unit.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/src/core/unit.c b/src/core/unit.c index acc575b6e0..447f2015ab 100644 --- a/src/core/unit.c +++ b/src/core/unit.c @@ -311,9 +311,6 @@ void unit_add_to_gc_queue(Unit *u) { u->in_gc_queue = true; u->manager->n_in_gc_queue ++; - - if (u->manager->gc_queue_timestamp <= 0) - u->manager->gc_queue_timestamp = now(CLOCK_MONOTONIC); } void unit_add_to_dbus_queue(Unit *u) { |