Main Content

异步并行编程

使用的功能在背景中使用帕菲瓦尔

You can evaluate a function in the background without waiting for it to complete, using帕菲瓦尔。在许多情况下,早日脱离循环可能很方便。例如,在优化过程中,您可以在结果足够好时尽早停止循环。您可以使用帕菲瓦尔orParfevalonall。This can be useful if you want to be able to plot intermediate results. Note that this is different from usingparfor,您必须等待循环完成。

Usesendandpoll一起使用数据队列发送和轮询来自不同工人的消息或数据。您可以使用后到达从数据队列接收新数据时添加函数。

Use后到达andafterAllto automatically invoke functions after each or after all elements of aFuture阵列完成。此数组可以包含返回的期货帕菲瓦尔,,,,Parfevalonall,,,,后到达orafterAll

职能

展开全部

帕菲瓦尔 在平行池工作人员上运行功能
Parfevalonall 在并行池中所有工人中都不同步执行功能
ticbytes 开始计数在平行池中传输的字节
to 阅读自调用以来已传输了多少个字节ticbytes
send Send data from worker to client using a data queue
poll 检索从工人发送的数据
后到达 定义一个在Dataqueue上收到新数据时要调用的函数
后到达 Run function after each function finishes running in the background
afterAll 在所有功能完成后运行后运行功能
获取图 检索后台运行功能的结果
fetchnext Futurearray
取消 Stop function running in the background
取消 Cancel all jobs or tasks
等待 等待期货完成
Future 计划运行的功能
Parallel.Pool Parallel pool of workers
Parallel.Pool.Dataqueue 发送和聆听客户与工人之间的数据
Parallel.pool.pollabledataqueue Send and poll data between client and workers

话题