Home
Sign Up
Sign In
推荐学习书目
›
Learn Python the Hard Way
Python Sites
›
PyPI
- Python Package Index
›
http://diveintopython.org/toc/index.html
›
Pocoo
值得关注的项目
›
PyPy
›
Celery
›
Jinja2
›
Read the Docs
›
gevent
›
pyenv
›
virtualenv
›
Stackless Python
›
Beautiful Soup
›
结巴中文分词
›
Green Unicorn
›
Sentry
›
Shovel
›
Pyflakes
›
pytest
Python 编程
›
pep8 Checker
Styles
›
PEP 8
›
Google Python Style Guide
›
Code Style from The Hitchhiker's Guide
V2EX
›
Python
分享轻型、无状态,由 Greenlets 构成的异步任务队列——tuck
mengzhuo
·
Jul 8, 2014
· 3003 views
This topic created in 4353 days ago, the information mentioned may be changed or developed.
平时都是return result.get(),对于发起请求的用户还是阻塞的……
我想直接return 不就成了任务队列了吗?
其实就是这么简单……
欢迎有更好实现的拍砖,互相学习哈哈
队列
异步
result.get
2 replies
•
2014-07-08 20:29:15 +08:00
1
skybr
Jul 8, 2014
gevent的queue干这个比较清晰合适吧
https://gist.github.com/anonymous/e2ed7a6e0f15df9d8122
2
mengzhuo
OP
Jul 8, 2014
@
skybr
最初不这么写就是因为不想调用join……这样会阻塞到有返回啊……
About
·
Help
·
Advertise
·
Blog
·
API
·
FAQ
·
Solana
·
964 Online
Highest 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 30ms ·
UTC 22:10
·
PVG 06:10
·
LAX 15:10
·
JFK 18:10
♥ Do have faith in what you're doing.
❯