How long does it take to create 1 million threads in Haskell?

后端 未结 4 1102
栀梦
栀梦 2021-01-31 21:55

What I understand, Haskell have green threads. But how light weight are they. Is it possible to create 1 million threads?

Or How long would it take for 100 000 threads?

4条回答
  •  半阙折子戏
    2021-01-31 22:25

    Well according to here the default stack size is 1k, so I suppose in theory it would be possible to create 1,000,000 threads - the stack would take up around 1Gb of memory.

提交回复
热议问题