如何在haskell中创建线程? [英] How to create threads in haskell?

查看:142
本文介绍了如何在haskell中创建线程?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何创建线程并将任务分配给他们?有没有办法做到这一点,比如使用

How to create threads and assign tasks to them? Is there any way to do it, like usage of

thread.start_new_thread ( function, args[, kwargs] )

在Python中吗?
在此先感谢

in Python? thanks in advance

推荐答案

Haskell线程可以使用 forkIO

Haskell threads can be spawned using forkIO.

我建议您阅读 GHC并发指南 ,因为它有所有相关的指针。

I recommend also reading the GHC concurrency guide, since it has all the relevant pointers.

这篇关于如何在haskell中创建线程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆