guillermo/dispatch_queue
DispatchQueue
DispatchQueue is a simple way to serialize jobs.
It was done for crawling things, but could be used in any case that you need to do more than one work at a time.COMPATIBILITY
Check build status to see support in different platforms
USAGE
[1,2,3].threaded_each{|i| sleep 4-i puts i}
3 2 1
[1,2,3].threaded_map{|i| sleep 4-i ; i } #=> [3,2,1]
my_work_queue = DispatchQueue.new(lambda{ sleep 3 ; 5}, lambda{ 10 })my_work_queue.sort #=> [5, 10]
DQ[ lambda{ sleep 5 ; 3} , Proc.new{ sleep 6; 2 } ].sort #=> [2,3]
CHANGELOG
LICENSE
"THE BEER-WARE LICENSE" (Revision 42):
guillermo@cientifico.net wrote this file. As long as you retain this notice you
can do whatever you want with this stuff. If we meet some day, and you think
this stuff is worth it, you can buy me a beer in return Guillermo Álvarez Fernández1.1.0 Create [].threaded_each [].threaded_map (2011/09/22)
1.0.5 Reduce implementation
The implicit way:
The explicit way:
The threaded_way:
相关阅读:
Hadoop无法访问web50070端口
Hadoop问题汇总
Hadoop问题汇总
Linux网络连接模式以及修改静态IP
Linux网络连接模式以及修改静态IP
Linux基本命令
SQLite数据操作
SQLite初试
编码与解码
属性列表原文地址:https://www.cnblogs.com/lexus/p/2636243.html
最新文章
plsql如果表和函数等显示不出来
ASP isPostBack
vs 2012 智能提示后为何不能 直接按enter键把提示的内容输入
VB6的序列号
无法向会话状态服务器发出会话状态请求请。确保 ASP.NET State Service (ASP.NET 状态服务)已启动
DXperience-11.1.5 破解
三大排序
集合
数组和集合的区别
ArrayList,LinkedList,vector的区别
热门文章
java.io包中的四个抽象类
sleep和wait区别
final,finally,finalize的区别
string和stringBuffer,stringBuilder的区别
操作运算符及其优先级
变量作用域
jdk-linux安装
jdk-linux安装
Hadoop进程启动
Hadoop无法访问web50070端口