Questions tagged [nonblocking]

Non-blocking mode I/O either transfers at least one byte or returns immediately with an error or end of stream. Non-blocking algorithms refer to use of concurrency without the usual mutual exclusion primitives, guaranteeing that thread operations will not block indefinitely. This is usually handled with atomic value modification (increment/decrement) and/or reading (compare-and-exchange) operations.. It isn't clear which this tag is intended for.

1597 questions
0
votes
3 answers

Subtleties of Non Blocking Assignments

Here in this example,a non-blocking assignment propagates to a continuous assignment. Can this cause any execution paradigms.Please elaborate on this piece of code- Possible errors, How can it be removed and good style of coding. always @(posedge…
chitranna
  • 1,579
  • 6
  • 25
  • 42
0
votes
1 answer

How can I get the status of non-blocking jobs of gearman submit_multiple_jobs?

how can I tell if a background job or a non-blocking request by gearman client is successful or not? while (True): jobs = getJobs() submitted_requests = gm_client.submit_multiple_jobs(jobs, background = False, wait_until_complete = False) …
shilk
  • 589
  • 5
  • 17
0
votes
5 answers

C# Best approach for a responsive UI during SQL query using COM interop

I am making a C# DLL plugin for a EXE written in VB6. I do not have access to the source of the EXE. The DLL itself works and communicates fine with the EXE. Here is the process for a event: User issues command on EXE which then calls a function in…
Lynxy
  • 117
  • 2
  • 8
0
votes
1 answer

Bash script - Start two background processes, wait for both to complete and get their output in variables

So, in my script, I want to start two processes in the background, after this I want to wait for both to complete and I want to get the stdout of the processes in variables. To run in background, I can use command & To get the result in a variable I…
Hashken
  • 4,396
  • 7
  • 35
  • 51
0
votes
1 answer

Do my (beginner) understanding of blocking and non blocking io is correct?

Right now I do a lot of research about concurrency and parallelism. Could you tell me if I understand correctly (on os level): Blocking io: When I explicitly wait for connection (ie. in Ruby:) conn = socket.accept So my thread is blocked until I…
Sławosz
  • 11,187
  • 15
  • 73
  • 106
0
votes
1 answer

how to correctly close SocketChannel java in JAVA?

I am developing multithreading non-blocking tcp server and client in Java. I have a problem with the server realizing that the client socket is closed. For him it's allways open. Here is the code and the output of my code: Server: /* * To change…
AdrianES
  • 670
  • 3
  • 13
  • 29
0
votes
1 answer

Implementing a non-blocking TCP Server

I am trying to implement a TCP server which will not hang (potentially) forever during a recv or sendall operation. I thought it would be enough to specify a timeout for the active socket, but this seems not to be the case: see here So, how could I…
Rickson
  • 1,040
  • 2
  • 16
  • 40
0
votes
1 answer

Example for Client socket that try to connect to the server for 2 seconds

Someone can add to my Example under, the code that define the Client socket try to connect to the server for 2 seconds please ? I read about that and i don't successful to do that, because of that i ask for an example. Example: Client: import…
MultiPython
  • 71
  • 3
  • 7
0
votes
1 answer

Problems with recv and timeouts

1) Is there a difference of the meaning of return values of sockets that are blocking and non-blocking? Sometimes recv() returns 0 even select() succeded before AND the peer on the other side did not close the half side of the connection as the…
HelloWorld
  • 2,392
  • 3
  • 31
  • 68
0
votes
1 answer

Ncurses, non-blocking getch misses first character

Im using Linux and ncurses for my application, and i'm using getch as non-blocking using nodelay. The problem is that while looping with getch for the input, it always misses the first character. For example the input "Helloworld" would print up as…
Bennu
  • 3
  • 2
0
votes
1 answer

SSL and NIO Non-blocking Sockets

How do you recommend making a highly scalable SSL client? Currently, I'm using plain Sockets to connect to the Apple APNS server which requires a non-HTTP SSL sockets. I considered using the NIO library, but it is lacking a SSLSocketChannel, and I…
notnoop
  • 58,763
  • 21
  • 123
  • 144
0
votes
1 answer

JavaScript async script is blocking

I've been having trouble loading connect.facebook.net/en_GB/all.js. I'm not sure if it's happening to anyone else, but this script takes forever to load (sometimes doesn't load). It doesn't even timeout. I have a PHP script which loads a few scripts…
0
votes
2 answers

Synchronized blocks and Locks

I have two threads and I am currently doing locking using an Object's notify() and wait() methods inside Synchronized blocks. I wanted to make sure that the main thread is never blocked so I used a boolean this way (only relevant code…
Abdullah Shoaib
  • 2,065
  • 2
  • 18
  • 26
0
votes
1 answer

java.nio DatagramChannel non-blocking mode.. you still have to block?

I've been looking into java.nio's asynchronous capabilities, and so far I am a fan of the AsynchronousByteChannel class, as it lets me provide completion callbacks for each read or write operation. This adapts well with scala's Future class. Now I'm…
Dylan
  • 13,645
  • 3
  • 40
  • 67
0
votes
2 answers

Python socket not receiving anything

I'm trying to receive a variable length stream from a camera with python, but get weird behaviour. This is Python 2.6.4 (r264:75706) on linux(Ubuntu 9.10) The message is supposed to come with a static header followed by the size, and rest of the…
Atilla Filiz
  • 2,383
  • 8
  • 29
  • 47
1 2 3
99
100