89 questions
0 votes
1 answer
88 views
Is there a way to know the functioning of the event queue in pygame?
from time import time import pygame pygame.init() t = time() Events = pygame.event.get() print(Events) end = False while not end: if time()-t>3: print(Events) Events = ...
0 votes
0 answers
118 views
The execution order of setTimeout and AJAX onload callback function
I am fairly new to javascript and after having a basic understanding of how event loop, callback queue and webAPIs work together to achieve asynchronous in Javascript. I have a following simple code ...
1 vote
3 answers
5k views
JavaScript onMouseDown and onClick events versus event queue
I have following simple JS code (https://stackblitz.com/edit/web-platform-ueq5aq?file=script.js): const baton = document.querySelector('button'); baton.addEventListener('mousedown', (e) => { ...
0 votes
0 answers
230 views
Sending remainder email dynamically node js
I have an application where I have to remind the user 1 week, 2 days and also 2 hours before of the appointment date. I have implemented this with cron-job already, but wanted to know is there any ...
-1 votes
1 answer
139 views
SV assertion to flag incorrect verilog event region
Is there a system verilog construct which can flag an error if a signal toggled in NBA region in verilog event queue? Something like if($toggled_in_nba(clk)) begin `uvm_error() end
2 votes
0 answers
397 views
Why can't gdb read io_uring_cqe contents?
I am trying out loti-examples (Lord of the Uring) commit 8724d47 and liburing commit 7ff4fee on Ubuntu 20.04 with mainline kernel 5.12. I use the following patch for loti-examples to have a better ...
2 votes
1 answer
2k views
Avoiding Race Condition with event queue in event driven embedded system
I am trying to program stm32 and use event driven architecture. For example I am going to toggle a pin when timer interrupt occurs and transfer some data to external flash when ADC DMA buffer full ...
3 votes
2 answers
268 views
How Does the JavaScript Interpreter add Global Statements to the Event Queue?
I am not sure how statements in the global scope are placed into the JavaScript event queue. I first thought that the interpreter went through and added all global statements into the event queue line ...
0 votes
0 answers
441 views
console log inside a setTimeout unexpected delay
The following code gives an unexpected result. It only waits for the 1sec delay (and not the 5 seconds specified by the delayBySeconds() function) then prints the output as given below. function func()...
0 votes
0 answers
96 views
Why do functions from event queue aren't called even when main executions stack is empty?
I was reading an article on event queue. And the authour say " funcitons from event queue aren't executed until they find the main execution stack empty " and to demonstrate the same he ...
0 votes
1 answer
368 views
Java Swing Components Init NullPointerException [duplicate]
I'm trying to have a simple app that lets you pick some files and does some logic with them. I've created the interface via the JFrame Palette builder incorporated in IntelliJ IDEA. public class App ...
0 votes
1 answer
217 views
How to create queue of events in order by date
I am trying to create a queue of events and I want to be able to insert and delete from the middle of the queue in constant time, something like this: 3446 --- 9493 --- 15969 --- 48381 where the ...
0 votes
1 answer
180 views
Event queue cleanup
In my Tcl extension, a secondary thread is filling the Tcl event queue with events; the events contain pointers to structures with a dynamic life time. What is the right strategy for ensuring that ...
0 votes
0 answers
82 views
How to return a custom type <Hero> from View (GUI) to controller?
I'm making an MVC game called Swingy for a 42 project, it requires me to have a console and a GUI view implemented in the MVC pattern. I figured that I would have an instance of my view (either GUI or ...
0 votes
1 answer
530 views
Is there any difference between event queue and task queue?
I am a little confused about these two names,are they the same with each other?