How long pauses can occur in a Haskell program due to garbage collection?

牧云@^-^@ 提交于 2019-12-02 20:35:28

GHC is designed for computational throughput, not latency. As a result, GHC uses a generational, multi-threaded garbage collector with thread-local heaps. Garbage collection of thread-local objects does not stop other threads. The occasional major GC of the global heap will pause all threads.

Typically the pauses are in the small number of milliseconds, hwoever there is no guarantee of latency.

You can control the frequency of GC via several runtime flags (e.g. the gc -I interval).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!