looper's People
looper's Issues
A developer should have a constructor when he/she can provide their own queue to Simple Event Loop
- There should be a constructor which allows the developer to supply a queue during construction so that simple event loop will not maintain its own queue.
- A developer can directly add events to this queue and event loop should be able to process them.
When simple event loop is closed / stopped it should drain existing events which are pending in the queue
-
There should be a configurable option which should indicate if existing items should be drained or not, which is helpfull if multiple event loops are using same queue
-
There should be a status flag in event which indicates that event was disrupted / cancelled
-
The event for which handler is already running should not be marked as cancelled.
When simple event loop is closed it should not process further events
- When close / stop is called on simple event loop is called then it should not process events anymore.
- It will still finish the event for which it is currently executing the handler.
Add class design for event emitter
Add an event emitter interface which could be used to fire events to different event loops.
- Event emitter should be able to select an appropriate event loop
- There should be a facility to supply an event loop to the emitter.
- Developer will fire the event using emitter instead of calling add event on event loop directly
- Right now we do not consider different event emitters like simple event emitters, queued emitters. distributed emitters or reactive emitters. They would be a matter of different issue.
Add implementation class for Simple Event Loop
Add an implmentation for simple event loop. Requirements are as below
- Simple event loop should be a runnable so that it could be started in a separate worker thread
- It should implement the Event Loop interface.
- It should be based on processing local event. Distributed events are not a part of this implementation.
- It should drain all remaining events once stopped.
There should be default constructor available which will basically initialize an internal queue
There should be a default constructor for Simple event loop which should take no arguments. This constructor should initialize an internal queue which can be utilized to record events
Add class design for EventLoop, Event and Event handler cache
- Design the interfaces which depict the connections and relations between EventLoop, Events and Event Handler cache
- Only the basic interfaces are required for closing the issue. Specific implementations of these interfaces are a matter for other issue
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.