Blocking mode I/O blocks the issuing thread until the operation transfers at least one byte or an error or end of stream occurs. Blocking algorithms refer to an operation in multithreaded environment which temporarily restricts access to some resources to a single thread, thus blocking all other ones. It isn't clear which this tag is intended for.
Questions tagged [blocking]
1679 questions
29
votes
6 answers
MySQL : Permanently getting " Waiting for table metadata lock"
My MySQL database serves three webapps as the storage backend. However I recently encounter permanantly the error "Waiting for table metadata lock". It happen nearly all the time and I do not understand why.
mysql> show processlist
->…

toom
- 12,864
- 27
- 89
- 128
28
votes
4 answers
Android I/zygote64:Waiting for a blocking GC ProfileSaver
I'm having this problem when I debug my app. It blocks at this line and I don't know what is causing it. I could not find any answer or anyone that had the same problem. I have no clue what part of the code could cause this to happen. Do you have…

Vincent Gagnon
- 650
- 2
- 7
- 15
28
votes
2 answers
what happens when I write data to a blocking socket, faster than the other side reads?
suppose I write data really fast [I have all the data in memory] to a blocking socket.
further suppose the other side will read data very slow [like sleep 1 second between each read].
what is the expected behavior on the writing side in this case?…

Aviad Rozenhek
- 2,259
- 3
- 21
- 42
28
votes
6 answers
Concurrent and Blocking Queue in Java
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…

Yiannis
- 880
- 1
- 7
- 14
27
votes
2 answers
should LOCK_EX on both read & write be atomic?
file_put_contents ( "file", "data", LOCK_EX )
for writing (which means - aquire lock and write)
file_get_contents ( "file", LOCK_EX )
for reading (which means - aquire lock and then read)
will it throw exception? raise an error? block until lock…

Kamil Tomšík
- 2,415
- 2
- 28
- 32
27
votes
1 answer
ASP.net session request queuing
It seems to me that ASP.net queues up all requests that use the same Session ID. Let's say you've got 3 pages.
Default.aspx
protected void Page_Load(object sender, EventArgs e)
{
Session["asdf"] = "LOLZ";
}
Hitting this page would obviously…

Novikov
- 4,399
- 3
- 28
- 36
25
votes
4 answers
Mutex lock: what does "blocking" mean?
I've been reading up on multithreading and shared resources access and one of the many (for me) new concepts is the mutex lock. What I can't seem to find out is what is actually happening to the thread that finds a "critical section" is locked. It…

zmippie
- 1,509
- 2
- 17
- 22
24
votes
3 answers
Advantages of Java NIO in blocking mode versus traditional I/O?
I have pretty much already decided not to use asynchronous, non-blocking Java NIO. The complexity versus benefit is very questionable in general, and I think it's not worth it in this project particularly.
But most of what I read about NIO, and…

Chad N B
- 817
- 9
- 11
23
votes
2 answers
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…

Unknown
- 45,913
- 27
- 138
- 182
23
votes
1 answer
How do I perform a non-blocking fopen on a named pipe (mkfifo)?
If I have a program which creates and attempts to open a named pipe using mkfifo, how can I open a pipe for reading or writing without blocking?
Specifically, I'm writing a C program which can be run with or without a gui (written in Java).
In the C…

Zxaos
- 7,791
- 12
- 47
- 61
23
votes
4 answers
How to detect and measure event loop blocking in node.js?
I'd like to monitor how long each run of the event loop in node.js takes. However I'm uncertain about the best way to measure this. The best way I could come up with looks like this:
var interval = 500;
var interval = setInterval(function() {
…

Fabian Jakobs
- 28,815
- 8
- 42
- 39
23
votes
6 answers
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…

Hassan Syed
- 20,075
- 11
- 87
- 171
23
votes
5 answers
Is it possible to block cookies from being set using Javascript or PHP?
A lot of you are probably aware of the new EU privacy law, but for those who are not, it basically means no site operated by a company resident in the EU can set cookies classed as 'non-essential to the operation of the website' on a visitors…

freestate
- 987
- 2
- 10
- 15
21
votes
3 answers
Oracle select for update behaviour
The problem we try to solve looks like this.
We have a table full of rows which represent cards. The purpose of reservation transaction is to assign a card to a client
A card can not belong to many clients
After some time (if it is not bought) a…

mateusz.fiolka
- 3,032
- 2
- 23
- 24
21
votes
2 answers
How do I write non-blocking code in Node.js?
I can write non-blocking I/O in Node.js very easily. It's what the entire library is set up for.
But any computation done is blocking. Any message passing over event emitters are blocking.
For example, emitting events are resolved immediately and…

Raynos
- 166,823
- 56
- 351
- 396