wait

How does one use the wait() function when forking multiple processes?

Hi all, Learning to use the fork() command and how to pipe data between a parent and it's children. I am currently trying to write a simple program to test how the fork and pipe functions work. My problem seems to be the correct use/placement of the wait function. I want the parent to wait for both of its children to finish processing. ...

delay after clicking blackberry application icon

i can't seem to figure out the following situation: when i i click on my blackberry app icon (within the simulator), the application pops up quick, no problems. however, when i take that same code and push it to my blackberry, there is a few seconds of wait time after the icon has been clicked. can someone tell me how to minimize the...

Making linux "Wait" command wait for ALL child processes

Wait is not waiting for all child processes to stop. This is my script: #!/bin/bash titlename=`echo "$@"|sed 's/\..\{3\}$//'` screen -X title "$titlename" /usr/lib/process.bash -verbose $@ wait bash -c "mail.bash $@" screen -X title "$titlename.Done" I don't have access to /usr/lib/process.bash, but it is a script that changes fre...

Explanation of Text on Threading in "C# 3.0 in a Nutshell"

While reading C# 3.0 in a Nutshell by Joseph and Ben Albahari, I came across the following paragraph (page 673, first paragraph in section titled "Signaling with Wait and Pulse") "The Monitor class provides another signalling construct via two static methods, Wait and Pulse. The principle is that you write the signalling logic yourse...

Waiting for image to load in Javascript

I'm making an Ajax call which returns me some info including an image path. I prepare all those informations in my HTML which will be displayed as a kind of popup. I just toggle the visibility of by popup div from hidden to visible. To set the position of my popup div, I have to calculate depending on the height of the image. So, I have...

How to write a loop in jQuery which waits for each function to complete before continuing the loop

Hi all, Please forgive me if this is an obvious one. I have an unknown amount of elements on a page, which I need to loop through one at a time and do stuff to. However, I need the loop to pause until the functions used on the elements have completed, and then continue on to the next iteration. I tried doing this in a $.each loop, but...

How do you create a waiting dialog in WIX?

Hi I'm trying to create a dialog to display whilst the installer is checking an SQL server exists. I've used the following code: <Control Id="Next" Type="PushButton" X="244" Y="243" Width="56" Height="17" Text="!(loc.WixUINext)"> <!--Show Waiting dialog--> <Publish Property="SQLServerChecked" Value="0">1</Publish> <Publis...

IPhone - Show Wait Indicator

Hi. What I try to do: If a user is pressing a button, a new view controller is being loaded and pushed to the navigation Controller. The new view controller is doing some hard database querying in it's ViedDidLoad Method which causes some seconds to get the view loaded. I'm trying to show a wait indicator before the view is starting t...

How do you make the script wait for the status of an Ajax get request before continuing?

Basically what I'm doing is checking for the existence of an object, if it's not found, the script will try to load the source file using getScript. I only want to check this once though then return true or false to the function that calls fetch() fetch:function(obj){ ... isReady = false; $.getScript(obj.srcFile,funct...

c# Crystal reports wait cursor

Using vs2008, winforms C#. Im using the crystal reports version that comes with vs2008. I can create and load a crystal report ok. But becasue it can take a few minutes to load, i want to bring up a wait cursor, but am having trouble with that. I have tried setting the this.crystalReportViewer1.Cursor = Cursors.WaitCursor; and tried...

How to wait for the user to select one of the datagridview rows?

I have a datagridview populated with some Names, I want to perform a check of all the Name in another database with the Names in datagridview and add the Surnames to the adjacent cell when a match is found, this I am achieving by string compare method. My Problem is that due to typing inconsistencies & at times with two people having sa...

A simple scenario using wait() and notify() in java

Can I get a complete simple scenario i.e. tutorial that suggest how this should be used, specifically with a Queue? ...

How to make C program wait (on Linux) ?

How to make C program wait (on Linux)? (I need to use wait with MPI - I need C code please) ...

Waiting on threads

I have a method that contains the following (Java) code: doSomeThings(); doSomeOtherThings(); doSomeThings() creates some threads, each of which will run for only a finite amount of time. The problem is that I don't want doSomeOtherThings() to be called until all the threads launched by doSomeThings() are finished. (Also doSomeThings...

Understanding Java Wait and Notify methods

Hello all: I have a following program: import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; public class SimpleWaitNotify implements Runnable { final static Object obj = new Object(); static boolean value = true; public synchronized void flag() { System.out.println("Before Wait"); try { ...

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 game. Here's what I already have : http://paste.pocoo.org/show/201761/ Class Player is a co...

How to get PowerShell to wait for Invoke-Item completion?

How do I get PowerShell to wait until the Invoke-Item call has finished? I'm invoking a non-executable item, so I need to use Invoke-Item to open it. ...

c - fork() and wait()

Hi there, I need to use the fork() and wait() functions to complete an assignment. We are modelling non-deterministic behaviour and need the program to fork() if there is more than one possible transition. In order to try and work out how fork and wait work, I have just made a simple program. I think I understand now how the calls work...

Wait set time for user input C# console app

For a Console app, I need to know how to wait at set amount of time (about 10 seconds), for a user to input a key or set of keys, before proceeding with an 'auto run' portion of the application. This is bugging me because I can't quite figure out how the timer works, or threading.sleep, what should I use? Been googling all day. some ps...

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 for input from all players during 10 seconds > 10 secs no more input Calculate the winner a...