Comments (7)
我真心没看懂………………,能详细描述下吗?
from eventpy.
from eventpy.
前几次好像正常的 多线程 后边就是单线程了
from eventpy.
from eventpy.
这不是问题。EventQueue的process
,事件派发是跟process
同一个线程的。
如果你想事件队列的事件是在多个线程里派发的,那每个线程需要调用process
或者processOne
(建议用processOne)。你可以看看这processOne的文档。
https://github.com/wqking/eventpy/blob/master/doc/eventqueue.md
from eventpy.
这不合理啊 事件处理方(消费者)应该可以同时处理多个啊 为什么生产事件的事件还要多个了。。
from eventpy.
合理,这是一般事件循环的机制。
用你的术语解释,process
是生产方向消费方推送,推送的动作发生在生产方的线程。
你如果要模拟生产者消费者模式,消费者可以主动调用事件队列的takeEvent
,或者用Python自带的队列。
from eventpy.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eventpy.