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.

In programming, 'wait' refers to the act of pausing the execution of a programm until a specific condition is met or a given amount of time has passed.

3454 questions
1
vote
1 answer

Shell Job Control: Track status of background with WNOHANG wait

What does GNU mean by this line (from here)? The shell must also check on the status of background jobs so that it can report terminated and stopped jobs to the user; this can be done by calling waitpid with the WNOHANG option. I don't understand…
Daniel Handojo
  • 612
  • 5
  • 19
1
vote
1 answer

Console wait until left mouse button down

I have the problem, that my console application wait at random points, until i press the left mouse button. The application is written in C#. I don't use ReadKey or something else in my application (Which even should wait for a key pressed not the…
BendEg
  • 20,098
  • 17
  • 57
  • 131
1
vote
0 answers

Waiting threads will wait forever in Java InetAddress.getByName(String)

I'm experiencing that some threads keep waiting forever because of how the synchronization sections are organized in the snippet below. The lookupTable.wait(); is inside synchronized (lookupTable), as the lookupTable.notifyAll(); also it is. Though…
1
vote
1 answer

Open PDF in Reader and wait until it exits

Is it possible to open a PDF in Adobe Reader so that the user can fill out the form, and then wait until / be notified when they close it? Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + file); seems to return immediately (so…
Brad Mace
  • 27,194
  • 17
  • 102
  • 148
1
vote
1 answer

program stuck on wait()

I'm having an issue with a process being stuck on wait. I've been troubleshooting this issue and its the only bug i have currently for my shell program. The problem is the program should exit when the user enters "exit". However it seems if the…
Mars01
  • 79
  • 2
  • 10
1
vote
2 answers

Android Lollipop Application Not Responding

my App runs fine on Android 4.4 - 2.3. but I recently updated my Nexus 7 to Android 5.0.2 (Lollipop) and only here I get an Error / ANR. But I don't know why. I can't find anything related here or in the web. The ANR appears, when I start an…
1
vote
1 answer

Python + selenium webdriver Wait for popup window

After executing Autotest, it is crashed cause Pop-up window appears about 20 seconds. I need to wait until Pop-up loads and close it. If you start the following code you can see the Pop-up window. import unittest from selenium import webdriver from…
1
vote
1 answer

VBA: Does 'Wait 1' wait 1 second?

I'm currently working with some semi automated scripts in VBA. I need to wait 1 second before going into the next loop. the method 'Application.wait' is not accessible due to these macros is for the AP2700 series. the loop goes like this: For i = 0…
Morten
  • 51
  • 8
1
vote
2 answers

Run a background process in perl, don't wait for it to finish

EDIT: found a solution here: http://www.webmasterworld.com/forum13/4416.htm Apparently it's way easier to do on Linux servers than Windows, google came through. #Print out whatever you're going to print print "Stuff in progress. Thanks." # Close…
user3430745
  • 33
  • 1
  • 5
1
vote
2 answers

How to add some delay after each iteration of array, each iterations changes view's property. Android

Lets say i have an array of char (mCharArray), and one textView (tvChar) that is the size of the whole screen. i want that, when the user clicks the screen (the tvChar), the textView shows each char inside the charArray, however it should have like…
1
vote
1 answer

Have Python wait for a function to finish before proceeding with the program

I have a python program that I have written. This python program calls a function within a module I have also written and passes it some data. program: def Response(Response): Resp = Response def main(): myModule.process_this("hello") #Send…
Brewer
  • 391
  • 1
  • 4
  • 13
1
vote
3 answers

Wait for an Event - Better solution than polling?

I'm working on a Problem on an existing Project. We want to read an ADC-value and normally we use there a fire-and-forget concept. We ask for the value and after the value is read an event is raised. However now I have to implement a function, which…
morgelo
  • 136
  • 15
1
vote
1 answer

How would I check for child process changing state but not terminating?

I'm using waitpid to get status code returned by the child when it changes state. I'm using: if (WIFEXITED(code)){ if (WEXITSTATUS(code)==0){ //worked correctly } else{ //failed, throw error } } else{ .. } In the…
NewGuy
  • 89
  • 1
  • 5
1
vote
3 answers

android: pausing an activity until another finishes

When my app starts, it checks to see if it has stored login credentials. if it doesn't, it starts another activity to prompt the user for those credentials. My problem is, that when the prompt activity is started, the first activity continues…
mtmurdock
  • 12,756
  • 21
  • 65
  • 108
1
vote
2 answers

Swift How to wait for callback to finish before exiting function?

The problem I'm having on this request is the first function syncRequest always returns nil since the function exits before the (reply, error) comes back to fill out my return dictionary. Is there a way for it to wait for the callback to return…
Jacky Wang
  • 618
  • 7
  • 27