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
0 answers
How to timeout blocking call in java
I am creating a multi-threaded application(like Typing Tutor game) where the user is given some timer(about 5 seconds) until which he has to type something in the console.After this timeout i have to perform next iteration.
But the blocking calls…

Shubham Kharde
- 228
- 2
- 10
0
votes
1 answer
objective c WatchKit WKInterfaceController openParentApplication call blocks indefinitely
I'm using the following code to "simply" determine the application state of the parent application from my watch app:
WatchKit Extension:
[WKInterfaceController openParentApplication:[NSDictionary dictionary] reply:^(NSDictionary *replyInfo, NSError…

user3335999
- 392
- 1
- 2
- 17
0
votes
0 answers
blocking specific numbers (call and sms) in android
I'm creating an app in which a user can choose any number to block
I think right algorithm is : when phone rings, a function check that number is in list or not (check in database) and if there is, reject that call
i found this code in internet but…

Aryana
- 11
- 1
- 6
0
votes
2 answers
blocking read(1) with timeout in pyserial
I use the following piece of code to read the serial port until i get a terminating character.
"""Read until you see a terminating character with a timeout"""
response=[]
byte_read=''
break_yes=0
time_now = time.clock()
while…

vamshi konduri
- 1
- 1
- 1
0
votes
1 answer
I can not take a critical section
I have a thread stopped taking a critical section. The critical section does not have any thread owning, the only strange thing is that LockCount is -3.
LockCount -3
RecursionCount 0
OwningThread 0
LockSemaphore dfc
SpinCount 10000
Inside debug…
0
votes
1 answer
Multithreading using Blocking IO corrupts file in Java
AIM :- TO build a multithreading application using Blocking IO in Java to download a file. Please don't suggest me to use Non-Blocking IO, I have been told to use this one.
Issue :- My code works fine on a client machine which downloads a file…

asad
- 318
- 1
- 16
0
votes
1 answer
Add a larger number of block users via one Twitter Api request
I just learn about Twitter for couple of days. I 'm facing a problems in building an app that add a large number of users to block list via Twitter Api (POST blocks/list ). But this Api is only work with one user per request, using it will lead to…

duykhanh
- 11
- 1
- 2
0
votes
0 answers
C# and arduino program blocks
I'm sending an integer from arduino to visual studio C#. I use myport.ReadLine() to get the data from the arduino but it is blocking the rest of my program. Does anyone know how I can solve this problem?

kikidr
- 1
0
votes
1 answer
ROS subscriber keep blocking callback
I am trying to program a PID controller using a ROS, the problem is that i am not able to publish any data from the PID node onto a the desired topic since my subscriber callback keeps blocking for that part of the code to be executed..
Do you guys…
user2691824
0
votes
1 answer
how to add non blocking stderr capture to threaded popen's
I've got a python 3 script i use to backup and encrypt mysqldump files and im having a particular issues with one database that is 67gb after encryption & compression.
The mysqldump is outputting errorcode 3, so i'd like to catch the actual error…

Alan
- 3
- 2
0
votes
0 answers
Atomic objects could have some form of internal locking
Usually I work with multithreading in java.
I started with Petterson's and Dekker's mutual exclusion and volatile to guarantee that the value of variables dont' be saved in a cache and everything were ok.
Then I tried with semaphores and also…

Shondeslitch
- 1,049
- 1
- 13
- 26
0
votes
3 answers
How to get out from a TCP blocking connect() call?
int tcp_sock = ::socket(PF_INET, SOCK_STREAM, IPPROTO_TCP);
struct sockaddr_in remoteaddr;
struct sockaddr_in localAddr;
short local_port = 22222;
short remote_port = 33333;
// local addr
localAddr.sin_family =…

Tahlil
- 2,680
- 6
- 43
- 84
0
votes
0 answers
Blocking HTTP call seems to timeout
I want to fire a blocking call to my php file which queries my db. I want it to be blocking and not async as i don't want the user shown anything until this call is successful or not.
I run the below code, it stops at response =…

Fearghal
- 10,569
- 17
- 55
- 97
0
votes
3 answers
Can't get InputStream read to block
I would like the input stream read to block instead of reading end of stream (-1). Is there a way to configure the stream to do this? Here's my Servlet code:
PrintWriter out = response.getWriter();
BufferedReader in = request.getReader();
…
0
votes
1 answer
logic behind blocks in method parameter
I have a little trouble understanding how this works. I am currently working with a sync table which uses calls like the following:
-(void)addItem:(NSDictionary *)item completion:(CompletionBlock)completion{
[self.syncTable insert:item…

DevilInDisguise
- 360
- 1
- 4
- 14