Questions tagged [wait]
In programming, 'wait' refers to the act of pausing the execution of a program until a specific condition is met or a given amount of time has passed.
3,468
questions
0
votes
0
answers
11
views
Waiting completion of running jobs before proceeding to next script [duplicate]
I have written a main shell script to do RNA-Seq data analysis for multiple samples. After a few initial commands, it has a command that initiates further sbatch jobs (one for each sample) using ...
0
votes
0
answers
19
views
BPSort Wait type with No colmunStore index [closed]
On my server, I regularly see BPSort wait types, but we have no column store indexes on the database. Any ideas about what could be causing this and how to resolve
Checked all internet searches, said ...
0
votes
1
answer
23
views
Issues with the placement of notify method
I was trying wait and notify methods. Notify method when put in run method does not work but when the same method is put in some other method it works.
public class NewProgram {
static int balance = 0;...
0
votes
1
answer
12
views
Should Asynchronous function calls be cancelled before wait if error occurs in Ballerina?
Regarding Asynchronous function calls https://ballerina.io/learn/by-example/asynchronous-function-calls/
Should we call future.cancel() if the code between the future declaration and wait throws an ...
-1
votes
0
answers
10
views
Liferay's manage endpoint is too slow sometimes
In Liferay 7.4, when I opened "Site Menu" > "Content" > "Documents and Media" (as instructed here), it took 1.1 minutes. Majority of the time was spent on "...
0
votes
1
answer
22
views
Waiting animation while download is being prepared and automatic download
Actually a simple task, but I just can't find a suitable solution
Data is collected in one form (HTML)
After sending, the server needs, among other things, a few seconds to provide the download, a ...
0
votes
0
answers
28
views
Why does subprocess.run() have unexpected behavior in try else block?
Trying to make a "to mp4" converter function using ffmpeg that is going to convert a file to mp4, delete the original file, and return True or False for specific conditions.
But I get some ...
-1
votes
0
answers
27
views
How do you wait for a Future object resulting from an API call to terminate?
I'm trying to wait for the results of a query to the api of my gradio chatbot but I don't know how to do it. I mean waiting for a Future object to complete. I thought .result() would wait for the ...
0
votes
0
answers
41
views
Wait for function to exit before continuing foreach loop in PowerShell
I have a list of functions that get called in loop $listoffunctions.
Some are run in RunspacePool (multithread) while others run in the main thread. The ones that run in main thread are forms with ...
0
votes
2
answers
50
views
implicit wait in selenium
I am very confused about how to use implicit wait in selenium
driver.manage().timeouts().implicitlyWait(1, TimeUnit.SECONDS);
driver.manage().timeouts().pageLoadTimeout(4, TimeUnit.SECONDS);
I saw ...
0
votes
0
answers
56
views
Qt5: How to wait for a signal (with filter) in a thread?
I have read the post how-to-wait-for-a-signal-in-a-thread, but still have some confusions:
What if I want to wait a signal with arguments, and filter the incoming signals based on some specific ...
-1
votes
1
answer
35
views
Issue in Passing data from one goroutine to another using channels
I have been able to develop below code which should pass data from one routine to another using go channels:
package main
import (
"fmt"
"sync"
)
func generateNumbers(...
1
vote
2
answers
104
views
Spring boot connection timed out
I do a wait for 5 seconds in a spring boot method and i'm getting a connection timed out exception.
@PostMapping(value="/api/stt", produces = MediaType.APPLICATION_JSON_VALUE)
public ...
0
votes
1
answer
36
views
Function should wait for previous function to finish processing before executing next line of code [duplicate]
I am working on TypeScript and I am trying to call a Modal within a function. But a service is called which validates some stuff from the server and based on what is returned I want to call the modal ...
0
votes
0
answers
169
views
Linux: Using "clone3" and "waitid"
I'm trying to learn about forking/cloning processes using the "clone3" system call. I have read the manual pages to understand it. Other than the manual pages, I was able to find only ONE ...
1
vote
1
answer
63
views
Why `wait` for the child when `read` could supposedly block the parent process in pipe?
I was learning pipe and communication between processes and I saw the following code to ping-pong a byte between parent and child processes:
int
main(int argc, char **argv)
{
int p[2];
char ...
0
votes
2
answers
103
views
Is there a simple wait / sleep function in Unity C#?
I'm making a game and I need to change a UI element timely like this:
t.text = "Hello!";
wait_function(3);
t.text = "I will be your guide.";
wait_function("TO DEATH!");
...
-3
votes
1
answer
26
views
Pause a Python Script to wait for a PopUp Window from Microsoft Edge Web Browser
Every morning I kick off a download from a Web Based application. When the download is complete, I receive a pop up window titled "Internet Explorer" which then allows me to select between ...
0
votes
0
answers
24
views
I get a java.lang.NullPointerException when the server waits [duplicate]
I'm working on a school project, and the task is to learn to create very very basic nodes for a 'distributed network' (it doesn't really deserve to be called that). Right now though, I can't make my &...
1
vote
0
answers
37
views
Why does my Ti-84 CE Plus not have a wait command in the program menu under CNTRL?
I'm trying to add a small delay in a program that I'm writing on my TI-84 CE Plus, and the programming guide that I found from Texas Instruments says that it should be A in the CNTRL menu, but it's ...
2
votes
1
answer
79
views
Setting condition variable monitor flag without a lock, is it valid?
The following code uses condition variable and a monitor flag to synchronize an operation between the main thread and thread2:
int main() {
std::mutex m;
std::condition_variable cv;
std::...
-1
votes
1
answer
60
views
The scope of a variable(using fork() and wait()) [duplicate]
I'm learning the wait and fork function, I'm trying to print out the Sum of the parent and child process but for some reason the Sum seems to be re-initialized to zero in the parent process, I'm also ...
0
votes
0
answers
30
views
How to dispatchEvent key up in a for loop and waiting for a dom search reaction to put the resulted element in an array
I would be gratteful if someone could give me some clue.
I'm trying to dispatch Key up event in a input element after fill in it. Everything is in the Dom. The line code is in a loop. So it gives me ...
1
vote
1
answer
29
views
How to get console responses in sequence?
I am using the library 'Logging' module to handle writes to the console and to a log file.
At the end of the script I have a 'Pause' to ensure that when the script is run the command window does not ...
1
vote
1
answer
41
views
WinForm Task.Wait : why is it blocking the UI?
I guess this kind of things should not be done in general, but I would like to understand why this code is getting the UI blocked, not returning from the await taskMain:
using System.Diagnostics;
...
0
votes
1
answer
52
views
How can I make one part of my code wait for another function to return a Boolean value and then continue execution?
So I'm making a discord music bot in python using discord.py library. I want to create a queue of songs by creating a function trough which the source to the requested song has to pass. The function ...
1
vote
2
answers
176
views
How do i put a delay in a while loop in Unity? [duplicate]
I just want a simple way to delay a while loop. I'm using C#.
Here's my code:
while (value<101)
{
Debug.Log(value);
value = value + 10;
//delay here (that i don't know how to do)
}
I ...
0
votes
0
answers
222
views
Swift - How to wait until a variable is a certain value before continuing execution?
I am working on an app that uses the MQTT protocol for communication. I would like to subscribe to a topic after the connection has been established. This is what I have so far and it works, but I ...
0
votes
1
answer
60
views
Is there a way to wait until one PHP script complete before start another instance of same .php file?
I'm running for example script.php via cron every 5 minutes. Sometimes, it is starts twice because first insance still working. Is there a way to prevent this?
0
votes
1
answer
39
views
How To Allow 2 Roblox Players To Jump On A Part And Both Get A Win
My Problem is that when I try to script what I listed in the Title, it always gives a win to only one player when they both jump at the same time. I just need help to fix this and only give 1 win to ...
0
votes
3
answers
70
views
From CMD, is it possible to execute a command after a for loop using start to launch several parallel tasks, but only AFTER all tasks have completed?
I'm running a command that modifies all the audio files in a folder, due to a bug in ffmpeg, I need to chain together an ffmpeg and sox command, but sox is really slow, so I run them in parallel, ...
0
votes
1
answer
57
views
pywinauto wait for window to appear not working
I'm using pywinauto to automate a DeskTop apllication and I need to wait an application be 'Ready" in order to go ahead with the other commands.
Can someone identify what I'm doing wrong in this ...
0
votes
1
answer
59
views
Thread is going in infinite wait state
Given an integer N, the task is to write a Java program to print the first N natural numbers in increasing order using two threads. However, the output is only showing the number 1 as the thread is ...
0
votes
1
answer
137
views
How is it possible to wait/detect until the application is ready ("start-work" complete)
I will in python start a application and wait until the application is READY (therefore I will NOT wait until the application is finished). It is a general question by me, therefore is it irrelevant ...
0
votes
0
answers
19
views
how does the batch entity exit the wait element if exactly 3 batches have entered?
how does the batch entity exit the wait element if exactly 3 batches have entered? now I'm confused about how to output the wait element. do you need java coding? because my model doesn't move anymore ...
0
votes
0
answers
79
views
how to apply vba code of hourglass check (cursor state)
For this answer, i still can't apply this code on my situation.
Get cursor state in Excel VBA 2013
This is my situation. When vba code running 1st click "retrieve button" in another program/...
0
votes
1
answer
64
views
How to wait for any keypress (global), or mouse click (on certain application windows) - Python
I have a simple python script that goes something like this:
user_input = ''
application = ''
print('press any key or click on any application...')
WAIT_FOR_INPUTS() # this is the part I'm stuck on
...
1
vote
2
answers
895
views
Playwright clicks element (drop down) before it is ready resulting in the drop down not opening
I have a product page containing a product with quantity options. There is a drop down to select the quantities. I want to click this to open it and select an option. The steps are simple:
Load page
...
0
votes
0
answers
42
views
Do notify signals in wait processors have a timeout or how to completely cleanup all notify signals
I have an algorithm where in a flowfile I create a queue of flowfile uuids that I must process from top to bottom. uuids are written to this flowfile seperated by newlines, so that a uuid at each line ...
-2
votes
1
answer
42
views
Roblox script error:ServerScriptService.CustomAnimee:4: attempt to index nil with 'WaitForChild'
Roblox script error:ServerScriptService.CustomAnimee:4: attempt to index nil with 'WaitForChild'
I tried to change humoinid to Player but didnot work either so that is the script i made it to use a ...
0
votes
1
answer
146
views
How can I wait for background processes to finish in Bash script - wait not working
The aim is to run two workloads concurrently, so each workload needs to be started in the background. Each of those workloads will have n workload processes running in the background (in the example ...
2
votes
3
answers
1k
views
How to wait for multiple responses in Playwright [typescript]
We have a method in Playwright to wait for a response.
page.waitForResponse
But, I need to wait for multiple responses using waitForResponse. How can we achieve this?
I have tried looping the ...
-1
votes
2
answers
500
views
Java Error: Exception in thread "main" java.lang.IllegalMonitorStateException: current thread is not owner
I am trying to make a wait in java using Thread, but i get the error:
Exception in thread "main" java.lang.IllegalMonitorStateException: current thread is not owner
I have tried
Thread t = ...
0
votes
2
answers
153
views
Can I make a pure Haskell function wait for 2 seconds?
In a Haskell program which I don't understand that well (yet), I would like a function
myInfo :: Int -> Picture
myInfo mode =
...
to take always 2 seconds longer than normal (to slow down the ...
0
votes
1
answer
38
views
1114. Print in Order
I was solving Leetcode problem 1114. I was using wait( ) and notify( ) concept. Using wait() giving time limit exceed but using notifyAll() is giving correct answer.
Why using notify() giving TLE and ...
1
vote
0
answers
83
views
Correct memory order to prevent potential deadlock
The below program has 4 threads that run sequentially. Since each of them is wait()ing on its own std::atomic_bool flag to be notified in order to resume its operation, it cannot check its own std::...
0
votes
3
answers
69
views
How can I rerun a method until it succeeds?
I want to rerun a method until it succeeds. I would like to block the application until it succeeds.
I'm currently using this code
public synchronized void initApplicationWithRetry() throws ...
0
votes
1
answer
240
views
Which method of initializing and using atomic_flag is better?
I see two ways of writing the below example code. METHOD 1 sets the two flags to true in main() and the two threads wait() on true. METHOD 2 does the exact opposite. It doesn't set the flags in main ...
-1
votes
1
answer
136
views
How to make function wait for map() execution in react
I have this function createOrder() that depends on the following map() function
const [rowsData, setRowsData] = useState([
{
width: { width: "", error: false },
height: { ...
2
votes
1
answer
279
views
How to wait for a non-child process?
Currently I do:
while [ -d "/proc/$PID" ]; do
sleep 1
done
Since I cannot use wait as it is a non-child process.
The problem is that sleep blocks any signal trap handlers (for example ...