On Friday, 9 June 2017 at 05:07:37 UTC, Ali Çehreli wrote:
On 06/08/2017 01:39 AM, Walter Bright wrote:
https://www.reddit.com/r/programming/comments/6fz3yh/cnow_2017_competitive_advantage_with_d/


Can someone verify and make corrections to my response to LordJebbs please:


https://www.reddit.com/r/programming/comments/6fz3yh/cnow_2017_competitive_advantage_with_d/dinumey/

Thank you,
Ali

Indeed, there is no special thread.

I'd say for the more relaxed reddit audience it can be put like this: the GC isn't "running" at all. Not persistently, not at all times, not in any special thread. It is not actively scanning anything. Any allocation on GC heap made by *any* thread *may* cause a collection, which is performed there and then in the same thread that triggered said allocation, and is observed as part of that allocation. All registered threads except the one that triggered the allocation (and thus, collection) are paused for scanning and resumed afterwards. Threads not registered with the runtime or those that were explicitly detached from the runtime are expected to not hold any pointers to the GC heap, and are neither paused nor scanned.

Reply via email to