Questions tagged [blocking]

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.

1679 questions
0
votes
1 answer

How to add blocking handlers with Netty 5.0?

I'm trying to figure out how to use the new Netty threading model to add blocking handlers to a Netty 5.0 pipeline. Previously, this task was performed with ExecutionHandler and OrderedMemoryAwareThreadPoolExecutor, but these do not exist in Netty…
Luke Hutchison
  • 8,186
  • 2
  • 45
  • 40
0
votes
0 answers

how to block write of slave pty

Assume we have a code pid_t pid = forkpty(&fd, &name, NULL, NULL); if (pid < 0) return; if (pid == 0) { // child process } else { // parent process to handle pty master } How to block the write in subprocess (pty slave) until parent process…
0
votes
1 answer

ImageIO.read() stalls program when running without Eclipse

This code loads an image in a BufferedImage object. ImageIO.read() may take an InputStream as an argument. I first tried getting an InputStream from a socket and loading. Then I tried loading the image in an array of bytes and giving this array as…
0
votes
1 answer

Disable blocking in phpseclib/SSH2?

I'm running some commands on multiple servers and I want them to all run concurrently, foreach($clust['hosts'] as $hostStr) { list($host, $port) = Str::rsplit($hostStr,':',2,22); $ssh = new \Net_SSH2($host, $port); …
mpen
  • 272,448
  • 266
  • 850
  • 1,236
0
votes
2 answers

How can you asynchronously call a method containing an infinite loop without blocking?

I've been working on a client application that connects to a server asynchronously using the async and await keywords. I am trying to asynchronously call a method with an infinite loop that checks for an internet connection every few seconds. Here…
Zach
  • 177
  • 2
  • 2
  • 9
0
votes
2 answers

What is a blocking operation in node js exactly?

I have been reading quite a bit about blocking and non-blocking operations in node.js, and so far this is what I've put together: database operations --> non-blocking; open/close files -----> non-blocking; network operations ---> non-blocking; My…
user3289157
  • 645
  • 2
  • 13
  • 24
0
votes
2 answers

C# socket blocking with zero data

I have implemented C# tcp-ip client (both synchronous & async reading socket). After each SocketException, I'm automatically reconnecting connection with server. Then I have tested communication of client with ncat in windows. Here, if I kill ncat,…
Majak
  • 1,543
  • 1
  • 14
  • 28
0
votes
1 answer

Run 2 blocking loops in the same program

I want to run 2 blocking loops in the same program. In my program, I'm using nfqueue to intercept packets. When the queue is created it starts waiting for packets and blocks the program. When a packet arrives it will call the cb() function and then…
HaTiMuX
  • 621
  • 2
  • 10
  • 22
0
votes
1 answer

Named pipe blocking with user nobody

I have 2 short scripts. The first, an awk script, processes a large file and prints to a named pipe 'myfifo.dat'. The second, a Perl script, runs a LOAD DATA LOCAL INFILE 'myfifo.dat'... command. Both of these scripts work when run locally like…
dnagirl
  • 20,196
  • 13
  • 80
  • 123
0
votes
1 answer

My http request block,what 's wrong?

I view my homepage in chrome, only one http request, and i encounter this case. What 's wrong? I can see that the dns not found when happened, so it's not a bug of server. So what chrome do at the moment.
Markate Su
  • 33
  • 1
  • 7
0
votes
3 answers

verilog / systemverilog -- What is the behavior of blocking statements across two always blocks?

I am wondering about the behavior of the below code. There are two always blocks, one is combinational to calculate the next_state signal, the other is sequential which will perform some logic and determine whether or not to shutdown the system. It…
miles.sherman
  • 171
  • 3
  • 11
0
votes
1 answer

Jython CGIHTTPServer bug 'socket must be in non-bloking mode'

using jython as a CGI-Server via 'jython -m CGIHTTPServer' results in an error which is not present with C-Python: error: (20000, 'socket must be in non-blocking mode'). If one (like me) wants to use jython as a simple CGI-Server for jython models,…
Michael Hecht
  • 2,093
  • 6
  • 25
  • 37
0
votes
2 answers

ConsoleAppender is blocking

I am not sure what is happening here. I am starting a RMI server in a separate JVM. While connecting to the instance calling the remote method, the method get stuck after a very short time. The execution continues as soon as I shutdown the client…
wizardofOz
  • 127
  • 11
0
votes
1 answer

Read from input-port blocks when char is ready

I don't understand why my code doesn't work. I have a vector, this vector contains input-ports on certain locations and 0 on other locations. When there is an input port, I want to check if there is data available. If there is data available, read…
JNevens
  • 11,202
  • 9
  • 46
  • 72
0
votes
1 answer

Java external Process error stream readLine() blocks intermittently

I am shelling to an external windows program which updates its progress by repeatedly pushing new lines to the error stream. The command prompt looks something like this when it's running: 10% done 10% done 11% done and so forth. I'm having some…
eye_mew
  • 8,855
  • 7
  • 30
  • 50