Questions tagged [busy-waiting]
101 questions
0
votes
0 answers
Penalty_ Capacitated vehicle routing problem with multiple time windows
Brief introduction:
LKH-3 is an implementation of the Lin-Kernighan traveling salesman heuristic.
The goal is to build an LKH-3 version able to solve the following problem type:
CVRPMTW: Capacitated vehicle routing problem with multiple time…

Ayy
- 21
- 5
0
votes
1 answer
How Strict alternation guarantee bounded waiting?
How does strict alternation guarantee bounded waiting?
If there are two process P⁰ and P¹.
Suppose turn=0 but P⁰ doesn't want to enter CS. And P¹ wants to. Won't it lead to starvation, so how bounded waiting is guaranteed?
0
votes
1 answer
Multithreading : busy waiting in producer-consumer problem
#include
#include
#include
#include
#include
#include
#include
#include
int item_to_produce, curr_buf_size;
int total_items, max_buf_size, num_workers,…

Genie Kim
- 1
- 1
0
votes
2 answers
Interruptable Sleep?
I am currently building a python app which should trigger functions at given timestamps entered by the user (not entered in chronological order).
I ran into a problem because I don't want my program to be busy-waiting checking if a new timestamp has…

okiwi
- 1
- 1
0
votes
1 answer
Python/Flask/JS - Show waiting screen and continue after 5 seconds of waiting
I'm super new to Flask, and I'm trying to built a small app in python with Flask...
I would like to show a waiting screen and then after 5 seconds, continue to the following page. The problem is, that I don't know where I should put this "action"…

user2133561
- 155
- 1
- 10
0
votes
0 answers
Main doing different tasks on different signals
So I'm working on a project that I need to have my main do different tasks when it receives a, let's say, SIGINT signal and other tasks when it receives a SIGTSTP. The rest of the time, main doesn't need to do anything. The code I have come up with…

Da Mike
- 447
- 4
- 17
0
votes
0 answers
How to 'pause' a python script till some 'action' happens without busy waiting?
To elaborate, I need the script to check whether the system is connected to wifi ( using infinite busy wait loop) and once it connects, the script resumes to do whatever it wants to do next..
This works but as you can see, it wastes CPU time (it…
0
votes
0 answers
Read from C# Stream without busy waiting
I need to read content from Stream in C#. I do not know which kind of Stream it would be. Let's assume it is Network Stream and network is very slow. So I can't read all bytes immediately. I know that 4 bytes in stream is integer and this int…
0
votes
0 answers
How to properly busy wait on Windows?
I need to implement busy waiting.
If you think I shouldn’t, please provide a low latency alternative to busy waiting for ID3D11DeviceContext::GetData to return S_OK which works on Windows 7 SP1.
I’ve found KeStallExecutionProcessor API which does…

Soonts
- 20,079
- 9
- 57
- 130
0
votes
1 answer
how fast can c++ loop constantly check variable
I'm using a busy loop to check when a condition is true and take a picture, but I need to have less than 10millisecond delay when the condition is true, and when my loop detects it. Is this loop viable?
This is running on a slow raspberry pi…

Lightsout
- 3,454
- 2
- 36
- 65
0
votes
0 answers
2 bounder buffers shared with pthread calls, mutex locks and busy waiting
I am generally new to C so I have loads of syntax errors and referencing problems. I have written prodcons.c, a Struct that will create a bounded buffer of size 50 and a few helper variables. In main I create a variable of this data struct and…

SuperCjp23
- 7
- 3
0
votes
1 answer
Transmit complete call back not getting called in UART DMA
What I'm trying to do is fairly simple. Transmit through DMA and wait till it gets transmitted. And then receive and wait till it is received.
When I comment out the receive part(including the call back), it is going into the transmit complete call…

Venu Aditya
- 11
- 1
- 4
0
votes
2 answers
Microsoft Visual Studio is Busy when trying to clean the solution using Xamarin
I have an application created by Xamarin.Forms (PCL)
When I try to Clean the solution,
visual-studio goes to stops working,
and I can't open any file or press anything to close it.
just by killing the visual-studio process
'End Process Tree for…

Anas Alweish
- 2,818
- 4
- 30
- 44
0
votes
1 answer
How to avoid busy spinning of a pause-able producer?
Background
I've found some GIF animation library, which has a background thread that constantly decodes the current frame into a bitmap, being a producer to other thread :
@Volatile
private var mIsPlaying: Boolean = false
...
while (mIsRunning) {
…

android developer
- 114,585
- 152
- 739
- 1,270
0
votes
1 answer
execution sequential in node
I have a function in nodejs, whose instructions must be executed sequentially. I've tried the native options (async and await) for node 8 and promises. I can not make him wait for FindOne results before returning.
module.existe = function(usr, pass)…

don tato
- 1
- 1