recursion using only heap area

前端 未结 6 1661
你的背包
你的背包 2021-02-10 08:51

Are there examples of recursion using only heap area?

6条回答
  •  渐次进展
    2021-02-10 09:20

    Yes, it is possible to implement recursion using only the heap, and in some cases it's very desirable. For instance, see Stackless Python. One of the prime benefits of this is that an entire thread can become serializable and you can literally ship a thread from one host to another (even of a different architecture & operating system!).

提交回复
热议问题