collect: Factor out recurring collection of threads and children
We scan threads and children list several times while freezing
the tree, this is done to avoid race with new threads/kids
appearing.
Factor out the iterations code.
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
Showing
Please
register
or
sign in
to comment