blocking

jQuery UI modal dialog not blocking

I am new to javascript and jQuery. I am trying to implement a modal dialog using jQuery UI widgets. The modal dialog shows up correctly with OK and Cancel buttons, but the dialog('open') function call does not seem to block and wait for an OK or Cancel click. For example, when I run the following code .....on button click okToDelete...

What conditions cause Tokyo Cabinet to block

I'm using Tokyo Cabinet with the tc module in python. I store my data in the TDB format. I expected the table to block only for the duration of a write. Unfortunately, I see that when the file is open with in the "writer mode", other processes cannot read from it. Is that a standard behaviour, wrappers problem, or am I doing something wr...

Java Thread won't pause on I/O operation

I was under the impression that in Java, a Thread will pause and give other threads a chance to do some work during blocking I/O operations ( like Socket.read() or DataGramsocket.receive() ). For some reason in my multi threaded network application, a call to receive() is causing all my other threads to starve ( the thread that called re...

Asynchronous waiting while C# function is executing

I have a blocking function that executes an asynchronous MySQL query and returns the result when it is obtained. The reason is is asynchronous is this program is not allowed to lock up during a query. The function is called when the user presses a button, so the function may get called several times before the first query completes. I t...

C# How to implement waiting for a confirmation in data communication?

I have an class which should send/receive data in packet form. This class contains an event handler which runs when new data is available to be read from the physical medium. In the event handler I read the data from the medium and parse the available data for complete packets. Once a packet is identified an event is raised to pass the ...

Lua - get command line input from user?

In my lua program, i want to stop and ask user for confirmation before proceeding with an operation. I'm not sure how to stop and wait for user input, how can it be done? ...

Is having a function call block a bad design process?

I'm writing an API which is used to receive some data from another application. Currently the function is designed to block until data is received. In my mind this limits developers using the API to use multithreading or some sort of multi-process design. So is it better for a function to block or to return a null and then sleep for a fe...

CamelContext.start() doesn't block

Hi, I want to run a simple Apache Camel example that copies files from one directory to another: CamelContext context = new DefaultCamelContext(); context.addRoutes(new RouteBuilder() { public void configure () throws Exception { from("file://c:/fromdir/").to("file://c:/todir/"); } }); context.start(); If I run this example...

Blocking a function call in C#

Hello All, How do I block a function call in C#? This function gets repeatedly called by different classes.I want to lock it up so that no one else can use it until I perform my current operation. Then,i want to release it again. Please help.. Thanks Edit:I'm not actually using threads...but I am using timers that call the function ...

NSURLConnection - Is it possible to wait/block on a request?

Hi All, I need to wait for a response from a SOAP webservice, I am calling via a NSURLConnection as I need to manipulate the data being returned and then return it from my class to the calling class. I cant figure out how I can possibly do it. Here is my code at the moment: #import <Foundation/Foundation.h> @interface UsersBLL : NSO...

Device Driver DLL Blocking vs NonBlocking?

My company makes a product that connect to the PC via USB. I am writing a DLL driver, using Visual C#, for this product so that anyone who wants to write a program that can control or device can do so. Some of the operations that the driver will execute take several seconds for the device to complete (for example moving the motor in th...

Uploadify + Castleproject Monorail: Ajax calls cannot be done while uploading

Hi, I am working on a project using the uploadify jquery plugin and CastleProject Monorail as backend. The problem I get is that while uploading it seems to block the ajax calls (which are called in the meantime). The ajax are called after the upload is finished. The strange thing is, when I implement uploadify in a new castleproject m...

Query a PHP semaphore without blocking?

Hi. Is it possible to query a semaphore created with sem_get without actually blocking like the sem_acquire function does? Cheers, Dan. ...

Why is this blocking? (VB.NET multithreading with events and delegates)

Hello all I have a feature whereby a class in a dll displays a form asking a user to clear a fault on a printer before clicking a button to say "Retry". The users have been just hitting retry without bothering to clear the fault so I am now coding an interlock: The button on the invoked form is disabled until a call is made to an 'enab...

Multithreading python application hangs while running its threads.

I am trying to create a MainObject which is availible as a DBus service. This MainObject should always stay responsive to other objects/processes and for this non-blocking even while processing its items. for that reason items are processed in a seperate thread one after another (queue-style). You can add items to the MainObject via DBus...

Advice for efficient blocking queries

I would like to store tuples objects in a concurent java collection and then have an efficient, blocking query method that returns the first element matching a pattern. If no such element is available, it would block until such element is present. For instance if I have a class: public class Pair { public final String first; public...

read and write to same socket (TCP) using select

We're writing a client and a server to do (what I thought was) pretty simple network communications. Mulitple clients connect to the server which then is supposed to send the data back to all other clients. The server just sits in a blocking select loop waiting for traffic, and when it comes, sends the data to the other clients. This ...

Garbage Collection and Threads

AFAIK when a GC is doing its thing the VM blocks all running threads -- or at least when it is compacting the heap. Is this the case in modern implementions of the CLR and the JVM (Production versions as of January 2010) ? Please do not provide basic links on GC as I understand the rudimentary workings. I assume global locking is the ...

Best Practice: Blocking execution while waiting for an Async method

I am trying to adapt an existing program (internally written) to use a different library than it originally did. I've abstracted most of library-specific code away (seems to be the easier part). The issue is, the old library would execute a call using a blocking method, and our internal program is expecting a blocking method to be ca...

Is it possible to block php scripts in upload folder?

Hello, I'm experiencing my first form in php where images can be uploaded. I've seen some article on the web which explains it can be dangerous, so there is some way to block scripts on a specified folder? Something with .htaccess or php .ini instruction? ...