drincann / py-coroutine Goto Github PK
View Code? Open in Web Editor NEW协程调度器的底层实现(eventloop/eventqueue/asyncapi)
License: Do What The F*ck You Want To Public License
协程调度器的底层实现(eventloop/eventqueue/asyncapi)
License: Do What The F*ck You Want To Public License
目前的计时器实现在事件循环线程,作为事件队列中的任务,iotime 会严重影响计时器的准确性。
最好能在新线程中唤醒正在阻塞的事件循环,从而准确执行定时器。
原因是 win 下默认的 selector 实现不允许在未注册任何 I/O 事件之前等待 I/O。
现在每次 get 将另开线程等待 OS 调度,需要实现复用 selector。
当所有异步任务结束后,停止事件循环,结束主线程。
可能需要抽象一个实体,对异步任务进行计数。
此外,还应考虑失败的异步任务,例如设置连接超时时间,抛出异常,令 Future 失败,这里还需要修改 Future。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.