Why do garbage collectors freeze execution?
Posted
by
Martin
on Stack Overflow
See other posts from Stack Overflow
or by Martin
Published on 2009-11-30T17:50:33Z
Indexed on
2012/06/19
9:17 UTC
Read the original article
Hit count: 270
language-agnostic
|garbage-collection
I was thinking about garbage collection on the way home, and I began wondering, why does the garbage collector totally freeze execution of a program? Personally I would have designed it to block any threads which try to allocate a new object, but threads which were running would be left alone. I can't imagine any situation where this would be a problem compared to how a garbage collector currently works.
© Stack Overflow or respective owner