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
2 answers

How to wait for a thread to start another one in Android?

This code is called every time you click a button //Thread called when click a button Thread a = new Thread(new Runnable() { @Override public void run() { synchronized ((Object) contadordeMierda){ …
1
vote
0 answers

Reliable waiting for process tree completion

There is a recommendation to associate a Job Object with I/O completion port and to listen for notifications JOB_OBJECT_MSG_ACTIVE_PROCESS_ZERO as a right way to wait for child process (without access to source code) tree completion. But in…
SerG
  • 1,251
  • 4
  • 18
  • 37
1
vote
2 answers

java.util.concurrent.locks.Condition awaitUninterruptibly()

While I am reading java.util.concurrent.locks.Condition API documentation, I see that: When waiting upon a Condition, a "spurious wakeup" is permitted to occur, in general, as a concession to the underlying platform semantics. This has little…
Ram Bavireddi
  • 1,139
  • 1
  • 19
  • 43
1
vote
2 answers

ksh : Need to delete multiple directories quickly and reliably

I have many directories and need to delete them periodically with minimum time. Additionally for each directories delete status need to know i.e whether deleted successfully or not. I need to write on the ksh . Could you please help me out. The…
priya
  • 11
  • 2
1
vote
2 answers

Python subprocess block

I'm having a problem with the module subprocess; I'm running a script from Python: subprocess.Popen('./run_pythia.sh', shell=True).communicate() and sometimes it just blocks and it doesn't finish to execute the script. Before I was using .wait(),…
MW.
  • 11
  • 2
1
vote
3 answers

JAVA: How do I accept input during a certain period of time only

Im trying to do a simple game where I continually need input from players. This needs to happen during a certain time period only. Everything that is sent after that will be discarded. After the time period a new game starts. So: Start game Wait…
sebrock
  • 1,214
  • 2
  • 15
  • 32
1
vote
2 answers

A way to pause a method for 1 second

I'm doing a console application with Java. I have one method where I need to wait one second, then continue with my method. It's just a simple method, so it means there is no thread involved. What can I do? My Program looks like this: User writes…
user3549340
  • 121
  • 2
  • 2
  • 7
1
vote
2 answers

Which wait is more preferred in selenium Webdriver using Java? (Implicit or Explicit)

I am aware of the differences between them and how they actually behaves during execution. My Question is which one is more preferred in Automation using Selenium? I am using Selenium Webdriver with Java and Automating my Test-cases in TestNG…
User31
  • 51
  • 1
  • 4
1
vote
1 answer

wait action not working

I have a ball that start moving with an impulse but I want it to wait 3 seconds before doing so. I put this code thinking it would to something but it's not working. //add sprite to scene [self addChild:ball]; SKAction *wait = [SKAction…
1
vote
1 answer

loop while data refreshes in excel

i am trying to create an innocuous loop while bloomberg refreshes a large amount of data. After the data refreshes I want that printed (not an issue). The problem is, wait and other VBA delay commands actually stop the data from refreshing for some…
jpm351
  • 11
  • 1
1
vote
1 answer

sleep pauses whole Thread

I know my code isnt like written following the java conventions, but its just a little test... Ive got a JFrame in my class MainNF. This JFrame should show up and then disappear for a amount of time, which is entered in the JTextField jtf, while…
Jakob W.
  • 288
  • 1
  • 10
1
vote
3 answers

Can't set timeout for Qt's waitForConnected

I'm trying to make connection timeout in my Qt application customisable, but no matter what number I pass as argument to waitForConnected, the timeout is the same (and it's around 3 seconds, not the default…
Edgarth
  • 124
  • 1
  • 12
1
vote
0 answers

Read from stdin and "encrypt" the input in a child process

I have to write a little C program that does the following: read from stdin create a child process using fork and encrypt the input with crypt in that child process use sleep with some random time to simulate the encrypting process and the…
beeef
  • 2,664
  • 4
  • 17
  • 27
1
vote
1 answer

Wait for Formula calculation to finish before copying to next worksheet. Excel VBA

I have a problem with copying columns from one sheets to another. In the source of the worksheet, some of the cells are integrated with formula which are only calculated upon opening the workbook. Because of it, the result I end up copying from one…
De De De De
  • 326
  • 3
  • 10
  • 31
1
vote
1 answer

Selectively Enforcing Synchronization to Facilitate Maximum Concurrency

Here's what I'm trying to do, with Java: while(writeSetsIntersect()) { wait(); } doStuff notifyAll(); Here's where I'm stuck: doStuff can be executed concurrently if two threads write to different variables, i.e., they have disjoint…
Chance
  • 988
  • 2
  • 13
  • 29
1 2 3
99
100