Questions tagged [event-queue]
13 questions
24
votes
1 answer
How are the Event Loop, Callback Queue, and Javascript’s single thread connected?
GENERAL GOAL
I’d like to know how the following pieces of a javascript environment interconnect as a system.
Javascript Engine
Event Loop
Event Queue
We can limit this to a browser environment since node has been covered in another article…

kurtcorbett
- 1,355
- 1
- 12
- 17
10
votes
4 answers
Method to get the running thread id in javascript/jquery
I am new to javascript/jquery.
I have a simple question one of java script function is running and wanted to see the thread id for that thread.
In java we do like
Thread.getID();//in java
which will print the thread id of running thread.
In the…

swati
- 2,099
- 6
- 19
- 23
6
votes
5 answers
Java + Swing: writing code to coalesce change events
I have this data flow, roughly:
DataGenerator -> DataFormatter -> UI
DataGenerator is something that generates data rapidly; DataFormatter is something that formats it for display purposes; and the UI is just a bunch of Swing elements.
I'd like to…

Jason S
- 184,598
- 164
- 608
- 970
4
votes
3 answers
Can I change the event queue priority in JavaScript?
I need a distinct sound to play when a error occurs. The error is the result of a problem with one of perhaps two hundred barcodes that are being inputted in rapid fire. The event queue seems to handle keyboard input (which the barcode scanner…

dacracot
- 22,002
- 26
- 104
- 152
3
votes
2 answers
Difference between SwingUtilities Threads and AWT.EventQueue threads
I am using using the Netbeans 7 IDE to develop a GUI desktop application.
When I create the JFrame class , Netbeans uses the
java.awt.EventQueue.invokeLater(new Runnable() { }
To initiate the runnable object.
But my application has swing…

CodeAngel
- 569
- 1
- 11
- 31
2
votes
1 answer
Event Queue in SimPy
I'm coming from a SystemC world and I am trying to code something simple in Python. I wonder if Python has something similar to peq_with_get() (from SystemC) which is basically a queue that preserves all the triggers made to an event.
I developed…

Amir
- 421
- 1
- 4
- 14
1
vote
1 answer
Event Queuing in NodeJS
NodeJS uses a event driven model in which only one thread executes the events. I understand the first event executed will be the user JS code. Simple example from nodeJS website of a webserver is below
var http =…

ekhan
- 231
- 1
- 4
- 11
1
vote
1 answer
JS browser event handling
Right now I've got a little bit confused with browser events. I'm still not sure how event loop starts working. For example, when I dispatch custom event in the mid of some function, does event handling start right away or is it moved to the event…

Andrei Hrabouski
- 125
- 2
- 9
0
votes
2 answers
Why does fireTableChanged() on AbstractTableModel notify listeners last to first?
This is obscure, but for some reason the notification in AbstractTableModel is last-to-first, causing a bug in my code. I can fix it, but I'm wondering if anyone knows why notification is done in this way?
public void…

Garrett Hall
- 29,524
- 10
- 61
- 76
0
votes
1 answer
How to queue multiple events to a single eventHandler in actionscript 3?
I am building a framework for loading minigames (in swf), and am running into a problem.
I currently have a listener that listens for events that the child minigame sends to the parent framework. However, if the child sends two messages (events) too…

futureelite7
- 11,462
- 10
- 53
- 87
0
votes
2 answers
Any of the collections or data structure is non blocking in java
In event processing a function puts values into a collection and another removes from the same collection. The items should be placed inside the collection in the order they received from the source (sockets) and read in the same way or else the…

user64287
- 53
- 1
- 8
0
votes
1 answer
AWS lambda running the previous event's queue leftover functions
I am using AWS lambda for my application to get multiple records from dynamo using promises. Initially I set my context.callbackWaitsForEmptyEventLoop = true, so the handler will wait until the promises are resolved. Once the promises are resolved I…

itssiva
- 119
- 6
0
votes
2 answers
Lightweight Message Bus with broadcasting and routing capabilities?
I am trying to find the most light-weight message bus (queue?) that can handle the following:
Producer A subscribes to the bus. The bus is specified via a well known form of identification (like a name, a socket or something).
Consumer B…

Ashkan Kh. Nazary
- 21,844
- 13
- 44
- 68