Garbage Collection and Threads

后端 未结 6 1809
不思量自难忘°
不思量自难忘° 2020-12-05 07:49

AFAIK when a GC is doing its thing the VM blocks all running threads -- or at least when it is compacting the heap. Is this the case in modern implementions of the CLR and

6条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-05 08:18

    There are a number of GC algorithms available with Java, not all of which block all running threads. For example, you can use -XX:+UseConcMarkSweepGC which runs concurrently with the app (for collection of the tenured generation).

提交回复
热议问题