Chinaunix首页 | 论坛 | 博客
  • 博客访问: 4536477
  • 博文数量: 1214
  • 博客积分: 13195
  • 博客等级: 上将
  • 技术积分: 9105
  • 用 户 组: 普通用户
  • 注册时间: 2007-01-19 14:41
个人简介

C++,python,热爱算法和机器学习

文章分类

全部博文(1214)

文章存档

2021年(13)

2020年(49)

2019年(14)

2018年(27)

2017年(69)

2016年(100)

2015年(106)

2014年(240)

2013年(5)

2012年(193)

2011年(155)

2010年(93)

2009年(62)

2008年(51)

2007年(37)

发布时间:2015-01-05 21:42:47

原文地址:http://effi2.me/blog/2014/07/06/greenlet/Jul 6th, 2014“greenlet”是一个小而独立的虚拟线程,下面是一个小例子来解释它的用法。 from greenlet import greenletdef test1(): print 12 gr2.switch() print 34def test2(): print 56 gr1.switch() print 78gr1 =.........【阅读全文】

阅读(1007) | 评论(0) | 转发(0)

发布时间:2015-01-04 22:42:52

原文地址:http://blog.csdn.net/yueguanghaidao/article/details/24281751一直对gevent运行流程比较模糊,最近看源码略有所得,不敢独享,故分享之。gevent是一个高性能网络库,底层是libevent,1.0版本之后是libev,核心是greenlet。gevent和eventlet是亲近,唯一不同的是eventlet是自己实现的事件驱动,而gevent.........【阅读全文】

阅读(775) | 评论(0) | 转发(0)

发布时间:2015-01-04 22:16:38

遇到IO阻塞,就把控制权switch给 main thread coroutine。main thread coroutine将主控权排程给非IO等待的coroutine。当IO完成,gevent内部将该coroutine标记为可执行。原文地址:http://blog.ez2learn.com/2010/07/17/talk-about-coroutine-and-gevent/這篇文章是要大略介紹一下coroutine和Python的相關應用的函.........【阅读全文】

阅读(713) | 评论(0) | 转发(0)

发布时间:2015-01-04 21:49:16

原文地址:http://flyer103.diandian.com/post/2013-12-07/40060384842最近用了 gevent,做个小结,理理对 gevent 的认识。什么是 gevent?简介 (摘自 官网)gevent is a coroutine-based Python networking library that uses greenlet to prov.........【阅读全文】

阅读(16392) | 评论(0) | 转发(0)

发布时间:2015-01-04 12:40:34

Gevent can spawn a co-routine: g1 = gevent.spawn(function)After the function is been called, g1 has its return value: g1.valueIf we want to have a callback with g1.value: g1.rawlink(callback)This callback will be called before join: gevent.joinall([g1])Here is the expirement about this con.........【阅读全文】

阅读(853) | 评论(0) | 转发(0)
给主人留下些什么吧!~~

北大未名居士2013-03-08 10:16

回复  |  举报

北大未名居士2013-03-08 10:16

回复  |  举报

pureal2012-05-09 12:01

你好,看到一个帖子发现你看过APUE2英文版,我也刚好看到读写锁,写饿死的问题。所以想认识交流下,我没找到你的邮箱,我的是dwdang@126.com

回复  |  举报

大鬼不动2010-09-23 00:47

回复  |  举报

chinaunix网友2009-10-12 16:19

你好,你在Google Code上放的sg2fcitx的mainme.c源代码我下载编译会出现段错误。请问你的编译环境是什么?GCC版本是多少? 谢谢。

回复 |  删除 |  举报
留言热议
请登录后留言。

登录 注册