1,464 questions
Best practices
0
votes
9
replies
132
views
What's the best way to get a live update of a laptops battery percentage and status via a C program?
I'm creating a program that involves showing the battery percentage and charge status. I want to be able to have the program update as close to instantly as I can get.
Every example I could find ...
0
votes
1
answer
127
views
Windows 11 raw input API bad performance compared to Windows 10 [closed]
With my code which is just a regular RAW input example.... WM_INPUT, RIM_TYPEMOUSE... I'm getting on Windows 10 the full 1,000Hz of my mouse and on Windows 11 I'm getting about 128Hz.
How to fix this ...
1
vote
1
answer
65
views
How to poll inside a synctest scope?
Golang 1.24 provides synctest, which can create isolated environments with synctest.Run(f) called bubbles that have their own synthetic clock. This is really useful for testing my production code, ...
0
votes
1
answer
75
views
Azure App Configuration with AKS refresher burns quota fast
I have an AKS, Azure App Configuration (AAC) and a Key Vault in my Azure cloud.
I have in AAC some environment variables like BgTaskTimer = 10, and in Key Vault DbConnectionString which is added as ...
0
votes
1
answer
194
views
How to efficiently poll REST API Java/Spring Boot?
Currenlty I'm developing an application to automate database backup and restore operations. We are dealing with different types of databases, but one of them is MongoDb. Our MongoDb are hosted by ...
2
votes
1
answer
119
views
SDL_PollEvent() function strangely impacts rendering
I came across a behavior in SDL3 that concerns me.
In SDL3, the standard position of the origin of the screen's coordinate system is in the upper left corner.
I tried rendering a simple 100x100 ...
-3
votes
1
answer
669
views
How to perform polling using angular signals and resource API
I have this scenario, where the database is updated regularly, for example say stock market prices (I do not need immediate updates a poll every 2 minutes is good enough).
Using short intervals like 2 ...
0
votes
0
answers
19
views
Notification not received by poling method set interval. on PWA using service workers
Here in my code when accessed on a PWA(Ipad in my example)
the API call is made successfully also the PWA asks for notification permissions but after that there is no notification received on the PWA
...
1
vote
0
answers
98
views
Amazon Ads API Report Polling Suddenly Failing: Reports Not Completing
We are experiencing an issue while polling the Amazon Ads API to check the status of reports.
The polling mechanism was working fine before, but for the last 3 days, reports are not completing on time,...
0
votes
1
answer
108
views
Spring Boot : How can I wait until I get a record in a table and do some processing based on it?
Problem : An external API sends an event in Kafka topic and I insert it into the table when I receive the event. Meanwhile frontend calls my own API (/execute) and I need to do some processing based ...
0
votes
1
answer
629
views
WebView polling breaks on Android 15 after opening Chrome Custom Tabs
WebView polling breaks on Android 15 after opening Chrome Custom Tabs
I'm encountering an issue where polling in a WebView stops working on Android 15 after opening Chrome Custom Tabs. The polling ...
2
votes
5
answers
532
views
High frequency polling loop in C#?
I'm trying to create a high-frequency polling loop in C#, but I've issues with accuracy and CPU usage.
Example 1: The loop sleeps for ~15.6ms, instead of the specified 1ms per iteration. I discovered ...
0
votes
2
answers
55
views
Arduino Uno INTF0 flag not being set without main() function in WOKWI
The code can be found in Checking INTF0 Without ISR
The code works as expected when the main() function is present but it does not when main() function is left out of the code. I do not want to use ...
0
votes
1
answer
30
views
GET https://s10onilover.izisoft.io:0/socket.io/?EIO=4&transport=polling net::ERR_ADDRESS_INVALID
I am using SockIO for my Flutter project.
In production environment, the above error occurred.
Flutter version: 3.22.3
Socket_io_client version: socket_io_client: ^3.0.2
void initialize() {
socket ...
5
votes
1
answer
113
views
Why does `while let` in a Future implementation trigger the Waker, but `if let` does not?
I've been working on a Future implementation in Rust, and I've encountered behavior I don't fully understand. Specifically, I'm using std::sync::mpsc::Receiver inside the poll method, and I'm trying ...
1
vote
0
answers
267
views
What are the optimal values to set for busy-polling?
I have an application written in C++ for reading market data. The networking layer is implemented using boost asio, effectively tcp ssl websockets. When the market throughput is high, I can observe ...
1
vote
0
answers
266
views
Celery polling Redis every second
I have a Django application with two celery tasks set up. Both the tasks need to run only once at one minute after midnight (12:01 AM). This is just to update some statuses which change from "...
0
votes
1
answer
128
views
Polling in python
Here is my desired functionality:
I want to listen over the local host for a variable, let's say state 1 and state 2. I want my main script to execute function b, but if it receives a state 1 over the ...
0
votes
1
answer
708
views
How to write a polling function for polling an API until a URL is returned?
In Flutter, I am trying to write a function that periodically calls an API until a URL is returned, then passes that URL to another function. How the API works is that on the first call, it responds ...
0
votes
0
answers
33
views
error connecting to socket.io with python
I need to scrape the latest informations from the website: https://x13.bet/double
And I saw that all the informations from the website that I need is from: https://s.x13.bet:2053/socket.io/?EIO=4&...
2
votes
1
answer
41
views
Unexpected Extra Customer Creation When Polling with Stripe API in Go
I'm working on a Go application that involves polling Stripe for customer and subscription information based on a user's login. The goal is to check if a customer or their subscription exists and is ...
0
votes
0
answers
66
views
C++ main thread polling and blocking, termination on signal
I have a main thread which should do some work every N seconds (20 in this case) and wait/block/suspend in-between. However, at the same time, I want the application to stop correctly on a SIGTERM/...
2
votes
0
answers
423
views
Why does io_uring read a file so slowly in polling mode?
Problem Summary
I am working on a project that requires using io_uring with polling mode, but now I have encountered two problems:
I need to run it several times before I can output the content; ...
0
votes
1
answer
386
views
Efficient Strategy for Concurrent Workers Polling in PostgreSQL Without Duplicates
I have a PostgreSQL events table partitioned by event_timestamp:
CREATE TABLE events
(
id SERIAL PRIMARY KEY,
event_timestamp TIMESTAMP NOT NULL,
processed BOOLEAN DEFAULT FALSE,
...
1
vote
0
answers
366
views
Initiate RTK Query polling inside middleware
I have a Redux store middleware that listens to an action coming from one Redux slice and as a result I'd like to trigger polling against another (RTK Query) API slice endpoint, until the returned ...
0
votes
1
answer
194
views
Poll for data written to a file descriptor
Suppose we have a file descriptor for a TCP socket. Is there a way to poll for data written to a socket (as opposed to data being available for reading, or the socket being available for writing)? i.e....
1
vote
2
answers
480
views
Angular 17 - Trigger recurrent polling whenever a boolean variable becomes true and as long as it remains so
The situation is as follows:
I have a websocket for communication between app and server. If the websocket were to break I would like to enable backup long polling until the websocket becomes active ...
0
votes
0
answers
55
views
The delay of the .poll function in the driver code has not taken effect?
I added a GPIO driver to the kernel code of Linux v3.10, and added a .poll function to the driver code. I don't know why I added 8ms to the poll() function of test code, but I noticed that the delay (...
0
votes
1
answer
143
views
IPv6 send is not working in pysnmp when snmpwalk is being run through IPv6 from external servers
So I have an agent implemented in past that is facing the issue.
When I have 2 servers joined in a cluster, the publisher server cannot serve polling on IPv6. Running polling on IPv6 works locally on ...
1
vote
2
answers
120
views
Is it possible to integrate GLib mainloop into another?
I have a 3rd party library with mainloop. I want to use GLib/Gtk with the app I'm developing. Is it possible to integrate GLib mainloop into another host?
The host loop allows to register an fd and ...
2
votes
1
answer
147
views
What is the correct way of polling a list of libusb_pollfd structures?
The structure of pollfd is:
struct pollfd {
int fd; /* file descriptor */
short events; /* requested events */
short revents; /* returned events */
}
...
0
votes
2
answers
107
views
kotlin-coroutine can not be launched
when my fragment go backgroud of system, it invoke onStop().and then when my fragment go front desk of system, it invoke onResume(). but mainViewModelScope does not lanuch a coroutine.
my fragment
...
0
votes
1
answer
159
views
Why isn't my polling routine working when I poll on interrupt and works when I do on main routine
I have a routine that polls the status of a button connected on the microcontroller ATMega328P (on chip arduino nano but code is written in C++), the routine code is this:
#include <avr/io.h>
#...
0
votes
0
answers
144
views
With a single serial link, how to read continuous data every second (polling), and do other queries in the meantime?
I communicate with a hardware device via serial link RS232 (no other option available).
I need to continuously poll some data "foo", every second (if possible).
Sometimes I also need to ask ...
1
vote
0
answers
186
views
How to redirect a user from a browser page to a telegram bot with golang
I use go-telegram-bot-api for building a Telegram Bot.The logic is as follows: I send a link to the site with authorization in the tg bot, the user goes, logs in, and after clicking on the grant ...
2
votes
1
answer
626
views
Why is my epoll on the timerfd not working as expected?
I want to do some calculation every 5 seconds. For that I created a timerfd with interval and value of 5s and passsed that fd to epoll but the epoll_wait seems to be triggered multiple 1000 times in ...
0
votes
0
answers
634
views
Linux poll with a thread pool and multiple events
I am working on a simple client server program in C in which multiple clients will be connected to a single server.
Clients will submit operations/actions to the server and the server will process ...
1
vote
3
answers
1k
views
Replace client polling with AWS SNS/SQS/MQ
Problem Statement
I have an application in which the data on the client side (frontend) needs to be updated in near-realtime.
The backend updates a field in the database. There is a GET endpoint which ...
-3
votes
2
answers
127
views
How to poll a promise in repeating syncroneous code?
Let's say we have some Promise for we knew it resolves at some point. Now I have sync code (ag. no await possible) called repeatedly (eg. onAnimationFrame). How to use the result of the promise there, ...
1
vote
0
answers
409
views
aiogram. Remove executor messages from console
Using python3 aiogram library for a telegram bot. Is there a way to remove the messages from console generated by the executor? messages like Goodbye! or Updates were skipped successfully. if you ...
0
votes
1
answer
2k
views
Polling in React Typescript
I'm trying to implement a polling function in React using typescript. The polling function needs to make a REST API call to read a record in DynamoDB and continue polling every 30s until the 'Status' ...
0
votes
0
answers
488
views
Flask application with SocketIO transport mode "polling" giving 400 Bad Request error
I have a flask application running locally and on my device's IP address.
In my app.py file, I have configured SocketIO with the below options.
import eventlet
socketio.init_app(app, async_handlers=...
0
votes
0
answers
390
views
How to reset a Linux event descriptor created with EFD_SEMAPHORE
I have an event descriptor that was created in C code like this:
int notifyED = eventfd(0, EFD_SEMAPHORE | EFD_CLOEXEC);
The counter goes up and down as expected as a result of calls to eventfd_read()...
1
vote
0
answers
584
views
Push notification services vs Periodic server-polling for web application?
We're currently building a platform which offers both a website and a mobile app (both for iOS and Android). The website is basically ready, the mobile app being built now.
The customer desired that ...
0
votes
1
answer
124
views
the poll() system call blocks when i send a lot of requests to my server
I made a simple HTTP server that waits for requests and sends a small HTTP response and I want it to handle multiple requests.
I made the fd non-blocking and I poll before doing any operation but the ...
-1
votes
1
answer
139
views
C# .Net Serial Port "port.BytesToRead" sometime returns 0 when the "port.dataReceived" is called
I am writing a C# program to poll data from Arduino serial port which generates data through "serial.println". In C# program, I found "port.BytesToRead" sometimes returns 0 even ...
0
votes
0
answers
165
views
Manage pressure when polling SQS
Note: this is about adaptive scaling SQS poller/subscriber, but I tried to present it in slightly more abstract terms, just a backpressure managment and a mediator.
In code, I skipped all lock, ...
1
vote
0
answers
435
views
PowerAutomate Adaptive card needs to function as poll, how to accomplish this?
I'd like some help for this powerAutomate adaptive card I've made. I got the backbone for the card from Microsoft docs. However, when I post it in a teams channel, I can only select an option and ...
0
votes
0
answers
172
views
What is the best approach to continuously poll MongoDB streams and recover from failures in a Python background task?
so I have a background task which is to keep on listing to mongodb streams and do some processing. this task never ends and as long as the application runs i want this task to run, it this fails i ...
2
votes
2
answers
824
views
How to use the react-query result inside the QueryOptions
I want to use the result of a react-query v3 useQuery statement to possibly stop refetching, depending on the result. Therefore I'd use the response data object in the QueryOptions to determine the ...