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

Wait until task completed before running it again

I'm trying to animate the background of my view for several times. For example(of course it's need to be dynamic solution) for 4 seconds, each second it will animate from white to black. what we expect: second: white to black to white white to…
Roi Mulia
  • 5,626
  • 11
  • 54
  • 105
1
vote
1 answer

Angular wait for a $http call to execute the next function

I had been searching for this same issue here, I found something but all that seems to not be working for me. Let me describe my scenario: I am adding some features to a Web app done by myself, that Web app is used to manage the developing of the…
Albert Prats
  • 786
  • 4
  • 15
  • 32
1
vote
1 answer

How to interrupt p.waitFor()?

I have a Java program compiled in a .jar, so the end user can't really just ctrl+c it in the console. They have to end the java process in the task manager. However, there is a much simpler way, isn't there? public class Test extends JFrame { …
user2837858
  • 339
  • 6
  • 18
1
vote
0 answers

Casperjs testing bug with wait

So i'm working with casperjs and i have this weird problem... casper.test.begin('Login Page Behaviour', function suite(test) { login(); //casper.start(URLLOGIN, function() {...}) works fine casper.thenOpen(URLBASE, function() { …
Bertos
  • 63
  • 1
  • 8
1
vote
1 answer

can waiting thread which woke up context switch again

I am trying to get my Producer/Consumer working and I deliberately don't want to use BlockingQueue to understand finer details here. I understand when I call object.wait() the thread looses its lock and goes to WAITING state till someone notifies…
1
vote
2 answers

How to apply Dynamic wait in Ranorex?

I wants to apply dynamic wait in ranorex. To open a webpage I used static wait like this :- Host.Local.OpenBrowser("http://www.ranorex.com/Documentation/Ranorex/html/M_Ranorex_WebDocument_Navigate_2.htm", …
kkashyap1707
  • 494
  • 2
  • 8
  • 16
1
vote
3 answers

controlling threads flow

I had a task to write simple game simulating two players picking up 1-3 matches one after another until the pile is gone. I managed to do it for computer choosing random value of matches but now I'd like to go further and allow humans to play the…
sasklacz
  • 3,610
  • 10
  • 39
  • 58
1
vote
1 answer

wait() and notifyall() not working

Hello pleas help me with wait() and notifyall() I need it, cause of the do while repeat!, the function savegame() call over ion a server and after the function get an answer from the server, the other function should repeat. The part is in one…
JoJa
  • 23
  • 5
1
vote
2 answers

What Wait() Actually means in Java ? I will Wait or You Wait?

As my understanding, if I am thread then: When I call notify()/notifyAll() it means means I am sending a signal to other thread which are waiting on this object monitor. Am I right? But What the wait() means? Am I sending signal to other thread…
Saif
  • 6,804
  • 8
  • 40
  • 61
1
vote
3 answers

Understanding how fork() and wait() work together

This isn't in code review because I do not understand the full concept of the code to start with. If it should still be moved just let me know. I have some code and I would like to explain my thoughts on it, and I am hoping someone can tell me where…
Austin
  • 3,010
  • 23
  • 62
  • 97
1
vote
1 answer

IllegalMonitorStateException on notify() when synchronized on an Integer

I'm new to using wait() and notify() in Java and I'm getting an IllegalMonitorStateException. Main Code public class ThreadTest { private static Integer state = 0; public static void main(String[] args) { synchronized(state) { …
user3217229
  • 13
  • 1
  • 4
1
vote
1 answer

`cat & wait` in a script proceeds immediately

From the command line, typing cat waits for user input. But in the following script, wait ignores the background process. #!/bin/bash cat & wait echo "After wait" This script immediately blasts right past the wait command. How can I make wait…
ishmael
  • 1,796
  • 3
  • 18
  • 19
1
vote
1 answer

How to wait ALL elements with the same class name?

Please see the partial code below: public class OrderDetailsDashboard extends AbstractTestNGSpringContextTests { By orderDetails = By.cssSelector(".col-md-12 span strong"); By orderMoreDetails = By.cssSelector(".row.panel-info-summary span…
Nimrod_G
  • 871
  • 1
  • 6
  • 6
1
vote
1 answer

the return value of a child process

I am new to fork and exec, and I tried the following program. Program 1: int main(int argc, char *argv[]){ pid_t pid; int status; pid = fork(); if(pid == 0){ printf("new process"); execv("p1",argv); } …
richard.g
  • 3,585
  • 4
  • 16
  • 26
1
vote
2 answers

BASH: Pause and resume a child script

I want to control a child script somehow. I am making a master script which spawns many children scripts and need to RESUME and PAUSE them on demand. Child Do stuff PAUSE Cleanup Parent sleep 10 RESUME child Is this possible? AS PER…
Pithikos
  • 18,827
  • 15
  • 113
  • 136
1 2 3
99
100