开发者

Erlang process queues best practices?

I've built a proce开发者_Python百科ss queue implementation that creates a pool of worker processes that receive a payload message with the datum to work on. When that process is done, it sends a message back to the pool and the pool manager re-enqueues that process ID for use.

My question is this: is it better to discard the process and just spawn a new one? Or recycle it?


Process construction in Erlang is extremely lightweight. Discard and create a new one.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜