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
0
votes
1 answer
Wait till function finishes in recursive function
Given I have a recursive method:
tests = {
add: function (data, option, dataSet) {
if(option) {
dataSet.forEach(function (values) {
this.add(values.data, false);
}, this);
}
console.log(data.name)
}
}
And I…

Sebass van Boxel
- 2,514
- 1
- 22
- 37
0
votes
1 answer
Threads blocking during ReteMemory initialization
In my application, all threads are blocking during initialization of drools session
java.lang.Thread.State: BLOCKED
at org.drools.reteoo.common.ReteWorkingMemory.initInitialFact(ReteWorkingMemory.java:108)
- waiting to lock <5385ba43> (a…

Akshay Gehi
- 362
- 1
- 12
0
votes
2 answers
how to create a blocking function
I have a thread that needs to dispatch a message (a simulated mouse event that it sends using SendInput) as soon as it's generated. I want this to happen in a loop where there is no sleep; adding any sleep hurts performance as I basically want the…

72con
- 81
- 8
0
votes
2 answers
Make asynchronous code blocking
I want to make sure the the main thread is blocked until an asynchronous call is finished.
I am creating a new Thread to execute the async code.
here is my code:
Thread r = new Thread() {
public void run() {
asyncCall();
…

Soof
- 73
- 9
0
votes
0 answers
Handle blocking COM call in GUI thread
I'm implementing a C++ library that wraps a COM library (IMAPI) to more easily provide the functionality throughout our applications.
It contains wrapper classes for the various interfaces of IMAPI. These are instantiated in the GUI thread of a…

Robert
- 767
- 8
- 17
0
votes
1 answer
Heavy task not blocking nodejs
I have to loop an array, and compute to every element a very heavy task, within several functions, but I need the whole array finished before return the callback. The problem, is that node is not blocking there, is like treating this block of code…
user3945438
0
votes
1 answer
Super slow apps caused by large number of unending AsyncTasks
I have no idea, but my app is stalling sometimes completely (not responding to touching the screen) I thought I was following all the rules for threading, but my app is apparently slowing down the Sprint EVO! I have never used an app as slow as my…

Aymon Fournier
- 4,323
- 12
- 42
- 59
0
votes
1 answer
Blocking I/O calls in Linux
Are all blocking I/O calls in Linux somehow wrapped around read() and write() (http://www.gnu.org/software/libc/manual/html_node/I_002fO-Primitives.html)?
My use case will then be to intercept these functions calls and execute code before and after…

Curious
- 20,870
- 8
- 61
- 146
0
votes
0 answers
PHP fgets() always times out on a socket even after reading some data
I am creating a socket in this way:
$fp = fsockopen("tcp://".$ip, $port, $errno, $errstr);
stream_set_timeout($fp, 1); // timeout is one second
stream_set_blocking($fp, 1); // block until data is available
However, when I read I always get a…

Gabe
- 51
- 3
0
votes
2 answers
nodejs blocking further mysql queries
I have a MySQL query that returns ~11,000 results that then need further queries run on each result. While the code is running it doesn't allow other users to log in to the website.
Potential problems I've seen are the use of callback functions or…

Gabe Levasseur
- 71
- 1
- 5
0
votes
2 answers
Javascript: non-blocking callback (yet another time)
I am not an experienced developer and I have spent the last couple of days trying to understand few fundamental concepts about Javascript.
Single thread, blocking vs non-blocking and callback.
I have read a lot but I am still confused.
My…

gxvigo
- 787
- 4
- 10
- 20
0
votes
0 answers
Redis cache miss in spring boot Java
We are using redis cache through cloudfoundry. Ours is a spring boot Java project which uses method caching. One of our rest call is taking 1 min to fill up the cache. How can we block other restful call to wait until the first one finishes?
Sample…

penguin
- 21
- 3
0
votes
1 answer
open socket between java app and Php
I'm using socket to send data from PHP page to Java desktop application to process it and return processed data.
The problem is i can't use the data that received from Php page in POINT X (see java code).. i meant between reading and writing !
even…

Minions
- 5,104
- 5
- 50
- 91
0
votes
0 answers
Async hbase 'non-blocking' calls lock thread for ~70ms, why?
I'm using this tool for talking to hbase:
org.hbase:asynchbase:1.7.0
Why does the following code take ~70 ms?
long start = System.currentTimeMillis();
Deferred> meta = hbaseClient.get(new GetRequest(propsCtx.hbaseTable,…

eirirlar
- 814
- 6
- 24
0
votes
3 answers
Is there a buffer-filling receive method in Java?
I'm used to using Winsock in C++, and I have a server app that sends and receives data with headers similar to HTTP format.
When I use recv() in c++ with a sufficiently large buffer, I will always receive my whole packet...
Does the…

Wyllow Wulf
- 410
- 4
- 23