-
Notifications
You must be signed in to change notification settings - Fork 7
The Combined Event Loop
bmeck edited this page Sep 8, 2010
·
10 revisions
There is a problem when two event loops collide, SFML demonstrates this problem.
sf::Window only queues events with sf::Window::GetEvent, this means events will stack up while waiting.
By Node.js conventions, we should emit these events to listeners. However, we cannot do this easily from C++ without some concerns.
###Add events async to the event loop using v8's locker mechanism using a separate thread.
- Lockers can take a while to get to.
- Synchronization logic
###At the end of any event loop, check for events in our sf::Window pool.
- Can slow down the whole node.js event loop.
- Goes through JS to C++ bridge back and forth like crazy