blocking

Non-blocking getch(), ncurses

I'm having some problems getting ncurses' getch() to block. Default operation seems to be non-blocking (or have I missed some initialization)? I would like it to work like getch() in Windows. I have tried various versions of timeout(3000000); nocbreak(); cbreak(); noraw(); etc... (not all at the same time). I would prefer to not (expl...

Google Analytics - Blocks HTML/page rendering

I have used the "Better Google Analytics JavaScript that doesn’t block page downloading" to load Google Analytics dynamically so that it will not block HTML / page rendering. However, it appears occassionaly that my HTML page will block rendering on the Firefox 3.0 (WinXP) status message states: "Transferring data from www.google-analy...

How to create a simple c# http monitor/blocker?

I was reading that question (http://stackoverflow.com/questions/226784/how-to-create-a-simple-proxy-in-c) that is near of my wishes. I simply want develop a c# app that, by example, monitors Firefox, IE, etc and logs all navigated pages. Depending of the visited page, I want to block the site (like a parental filter). Code snippets/sam...

Non-blocking Socket Polling vs Blocking socket

I need to Send & Recv at the same time, which should be the best: 1 thread handling send & recv with non-blocking socket or 2 threads with One handling blocking recv() + one handling send() Or is there another option? I am expecting to have up to about 50 2 way connections.. Which result in 50 thread in option1, and 100 thread in opt...

JS Image Pre-loading blocked?

Hello, I am using a JQuery Plugin called lightbox (which is great btw). Problem is, I am accessing images on external sites and I think they are blocking lightbox from preloading them. Specifically I have confirmed that picasa gives the preloader a 404 (using firebug), but if I right click the failed request in the firebug "net" tab, a...

Event Loop vs Multithread blocking IO

I was reading a comment about server architecture. http://news.ycombinator.com/item?id=520077 In this comment, the person says 3 things: The event loop, time and again, has been shown to truly shine for a high number of low activity connections. In comparison, a blocking IO model with threads or processes has been shown, time and ag...

How to do a non-blocking URL fetch in Python

I am writing a GUI app in Pyglet that has to display tens to hundreds of thumbnails from the Internet. Right now, I am using urllib.urlretrieve to grab them, but this blocks each time until they are finished, and only grabs one at a time. I would prefer to download them in parallel and have each one display as soon as it's finished, wit...

C# The best way to callback a client application with interim results from a pool of threads.

I have written a C# library which has a method to count words from multiple passages of text in parrallel. The passages of text are given as character streams where there is a random delay each time getnextchar() is called. My library method has to take an array of these character streams and return a combined word-frequency count. To...

SQL Server SELECT statements causing blocking

We're using a SQL Server 2005 database (no row versioning) with a huge select statement, and we're seeing it block other statements from running (seen using sp_who2). I didn't realise SELECT statements could cause blocking - is there anything I can do to mitigate this? ...

Is it possible to know if a process(Java app.) is waiting in Blocked state on a Receive() call on Linux?

My main purpose is to execute processes one by one in a round-robin fashion until one calls receive() and is blocked, so that the execution switches to the next process in the queue. There is a controller application which is coded in Java and it executes these processes(which are also Java applications) using Runtime.getRuntime().exec()...

Can a query from an Oracle to a DB2 through a dblink block the DB2 table?

I have a middle size query with 500.000 registers from an Oracle to an DB2 system through a DBLink. Can this query block the DB2 table so that it can be updated until i close the DBLink or until i finish the job whith the query (an insert-select into an Oracle table) ...

How to stop the select box from being blocked as a pop-up bit Internet Explorer 8?

I'm working on a website where if I click on a normal select box it's blocked as a popup by IE8. What?! Is there something I'm doing? Is there any way around this? I am using a few jQuery plugins but nothing that effects those select boxes. Would the jQuery Form plugin do this? ...

java network i/o blocking or not?

Hi all, Hopefully this is a quick and easy question about BufferedOutputStreams and DataOutputStreams in java. When I write bytes to the output stream like myBufferedOutputStream.write(array); myDataOutputStream.write(array); Do these methods write them instantly to the stream and return or do they ever block? I did not see anythi...

C++ - how does Sleep() and cin work?

Just curious. How does actually the function Sleep() work (declared in windows.h)? Maybe not just that implementation, but anyone. With that I mean - how is it implemented? How can it make the code "stop" for a specific time? Also curious about how cin >> and those actually work. What do they do exactly? The only way I know how to "bloc...

java how to do a sender thread

Hi all, I was told that any data going out over an output stream (i'm using tcp/ip in my case) could block. In that case, I would not want to halt the application by having to wait for data to go out. I need a model of how to do this. I need to send message objects over this stream. I am thinking I need a blocking queue that conta...

How to wait for a Blocking Queue to be emptied by worker

I'm using a single producer-single consumer model with a blocking queue. I would like for the producer, when it has finished producing, to wait for the queue to empty before returning. I implemented the BlockingQueue suggested here by Marc Gravell. In my model, the producer (renderer) is using events to notify the worker (printer) whe...

Concurrent and Blocking Queue in Java

Hello Everybody, I have the classic problem of a thread pushing events to the incoming queue of a second thread. Only this time, I am very interested about performance. What I want to achieve is: I want concurrent access to the queue, the producer pushing, the receiver poping. When the queue is empty, I wand the consumer to block to t...

IIS email block list

Hi, I am wondering if there are ways to stop IIS from sending to a particular email or list of email addresses. I reckon if I can force badmail on a particular email address it might do it. But that's just bad manners. Thanks ...

Blocking IO vs non-blocking IO; looking for good articles

Once upon a time I bumped into Introduction to Indy article and can't stop thinking about blocking vs non-blocking IO ever since then. Looking for some good articles describing what are pros and cons of blocking IO and non-blocking IO and how to design your application in each case to get natural, easy to understand and easy to maintain...

Calling an blocking Actor from within an Actor

Given I invoke an actor from inside react does this block the calling Actor or is it still processing other requests? class worker extends Actor() { def act() = { loop { react { msg => var foo = another_actor !? 'bar' //Block here? println(foo) } } } ...