wait

J2ME in Netbeans (gif image problem)

I'm creating a indoor navigation application (with the intention that a user can store maps for different buildings in the phones file system). The application starts up by asking the user to select a map for the desired building. Once this has been selected, a file parser would be used to parse and convert the map data from the file. Wh...

Long UPDATE in postgresql

Hi there, I have been running an UPDATE on a table containing 250 million rows with 3 index'; this UPDATE uses another table containing 30 million rows. It has been running for about 36 hours now. I am wondering if their is a way to find out how close it is to being done for if it plans to take a million days to do its thing, I will kil...

wait statement in C-component?

Is there a wait statement in c-component? for example, wait for 0.5 second before continuing the process? thanks! ...

Wait for a specified amount of objects?

Using WaitForMultipleObjects: Makes it possible, to wait for one or all of specified objects to change to a singled state Question: How can one wait for a specified amount - such as 5, for example Usage dwEvent = WaitForMultipleObjects( maxExpectedConnections, ghEventsA, TRUE,//but wait for a specified number instea...

Spurious unblocking in boost thread

I came across this interesting paragraph in the Boost thread documentation today: void wait(boost::unique_lock<boost::mutex>& lock) ... Effects: Atomically call lock.unlock() and blocks the current thread. The thread will unblock when notified by a call to this->notify_one() or this->notify_all(), or spuriously. When the...

Bash: Sleep until a specific time/date

I want my bash-script to sleep until a specific time. So I want a command like "sleep" which takes no interval but a end-time and sleeps until then. The "at"-deamon is no solution as I need to block a running script until a date/time. Is there such a command? ...

Implement wait between processes in Java?

I would like some help understanding and implementing a 'wait until process complete' between the various processes in my application, which need to proceed in a step-wise fashion. My java file runs a batch file which then runs a script. At the conclusion of this there are series of commands that I need to run (through the command line) ...

jQuery fading/dimming other list elements when one is hovered over, I'm 90% there..??

I have an unordered list, which has maybe 30 items. When one of these items are hovered over, the rest of the list items fade to 30% and the hovered item stays at 100%; when you move away from the list, they all fade back up to 100% and I have managed this. My problems arises when you move from item to item, the other list items fade ba...

Blackberry - Loading/Wait screen with animation

Is there a way to show "Loading" screen with animation in blackberry? Options: PME animation content multithreading + set of images + timer/counter standard rim api some other way Any of this? Thanks! ...

Java - wait and notifyAll

What happens when you call notifyAll method on an object that is not waiting? Should there be exception or is it normal situation? ...

How to use wait and notify in java?

Hello, I have 2 matrices and I need to multiply them and then print the results of each cell. As soon as one cell is ready I need to print it, but for example I need to print the [0][0] cell before cell [2][0] even if the result of [2][0] is ready first. So I need to print it by order. So my idea is to make the printer thread wait until...

Is there a decent wait function in C++?

One of the first things I learned in C++ was that #include<iostream> int main() { std::cout<<"Hello, World!\n"; return 0; } would simply appear and disappear extremely quickly without pause. To prevent this, I had to go to notepad, and save helloworld.exe pause ase helloworld.bat This go tedious when I needed to create ...

How can I make Perl wait for child processes started in the background with system()?

I have some Perl code that executes a shell script for multiple parameters, to simplify, I'll just assume that I have code that looks like this: for $p (@a){ system("/path/to/file.sh $p&"); } I'd like to do some more things after that, but I can't find a way to wait for all the child processes to finish before continuing. Conver...

Is it better to poll or wait?

I have seen a question on why "polling is bad", but I am wonderring, in terms of minimizing the amount of processor time used by one thread, would it be better to do a spin wait (i.e. poll for a required change in a while loop) or wait on a kernel object (e.g. a kernel event object in windows)? For context, assume that the code would be...

Waiting for JSON data to be parsed

Is there a way to wait for jQuery's getJSON method? I want to parse the data, recieved with this function and just return false/true if a specific string is contained. But due to the asynchronous data processing this seems not to be that easy. Here is a code snippet: contained = false; $.getJSON(URL, function ( data ) { $.each( da...

How to keep message-pumping while waiting?

I have an application that is based on a message-pump thread-pool archtecture. Whenever there is an action that could block, it is implemented as "callback on complete/trigger evnet" action, so it won't stall the executing thread. While this techniqiue is appropriate for most cases, there are situations when it becomes very inconvinient...

wait fails in multithreaded application at 2.4 kernel

I have an application that is multithreaded - one thread is responsible for collecting the dead children with wait(), anther thread spawns them with fork upon request. I found out that on one platform with 2.4 kernel and LinuxThread wait always fails with ECHILD. I've found out that problem might be in non-POSIX compliant implementation...

WAIT for "any process" to finish

Is there any built in feature in bash to wait for any process to finish? We use " wait" only for the child processes to finish. I would like to know if there is any way to wait for any process to finish before proceeding in any script. A mechanical way to do this is as follows but I would like to know if there is any built in feature in...

jQuery - Wait till end of SlideUp()

Hey, How can I wait till the end of the jQuery function slideUp() before continuing the script? <script type="text/javascript"> $(document).ready(function() { $("div[class=item]").click(function() { var id = $(this).attr("id"); $("#content").slideUp(); switch(id) { // Applications case "rampro": $("#content").css("text...

java & threads: interrupted exceptions & how to properly use BlockingQueue's take() method

Hi all, My first question is what exactly happens when there is nothing on the queue and a take() is called. The API says the method will wait but does that mean the CPU spins checking for empty/not empty until an item is on the queue or does it mean that the thread yields and will be awoken by an interrupt? If it is the case of the f...