Skip to main content

Questions tagged [timeout]

Code that handles a condition (normally an error condition) triggered when an event fails to occur within a predefined time limit. For discussing inefficient code that takes an unreasonable amount of time to finish, use the [time-limit-exceeded] tag instead.

3 votes
1 answer
260 views

Introduction I have written a Python class which uses the module ftplib. In this class I have created a private method called <...
User051209's user avatar
1 vote
1 answer
415 views

This is a request-response model over sockets/websockets (like HTTP) where you technically match request id to response id and return the response. In addition to that, there is timeout in case that ...
nop's user avatar
  • 819
4 votes
1 answer
808 views

Real case: I need to retrieve data from a web service (main process), but in case that web service is taking too long, I retrieve the data from the cache (that data might be older) in a parallel ...
Andrey's user avatar
  • 141
3 votes
2 answers
4k views

Often I have async functions that I want to be able to time out, this timeout is independent of the greater scope of the application. However the function should also take into consideration the ...
Adriaan's user avatar
  • 55
10 votes
5 answers
2k views

I wrote this code to find opposites of words (i.e., words backwards). Input is a list of words. If this list contains a word + its opposite, then it should form a pair. The output should be a list of ...
planetx's user avatar
  • 101
3 votes
1 answer
2k views

I designed a simple timeout thrower for a bluetooth protocol I am writing. If the packet is not received in a certain amount of time, then timeout is thrown. I made it to be as plug and play as ...
Aubrey Champagne's user avatar
1 vote
1 answer
113 views

Below is a piece of code that uses a promise for sending a request to a server, and to wait for an answer. Under normal conditions the server will always respond immediately, But of course you don't ...
bvdb's user avatar
  • 133
0 votes
2 answers
567 views

I am solving the "Spread the Word" problem on CodeChef: Snackdown 2019 is coming! People have started to spread the word and tell other people about the contest. There are \$N\$ people numbered 1 ...
Sandesh34's user avatar
  • 151
5 votes
2 answers
4k views

I want to check for a condition in a guarded wait() loop with a user-specified total timeout, similar to how ...
Mark Jeronimus's user avatar
0 votes
1 answer
2k views

I have the following functions for polling some function periodically with a timeout ...
geofflittle's user avatar
2 votes
0 answers
70 views

I have implemented a method which will send one data to the server if it (Raspberry Pi Pin Input HIGH, in this case) occurs within 10 seconds. If this doesn't happen within 10 seconds then I should ...
Khojiakbar's user avatar
3 votes
2 answers
2k views

I have a Node.js app / Web API that runs on an Azure app service with a single CPU. One of the functions needs to run for a long time, perhaps tens of seconds, while the server should continue to ...
user avatar
2 votes
1 answer
2k views

I have a long running operation that I need to wait for or timeout. I have working code, but I would like your opinion on improving it. ...
Raskolnikov's user avatar
4 votes
2 answers
2k views

I am currently having a problem with too many database connections. Therefore, I am trying to implement a database connection timeout. In the code below the changing of value of the shared resource ...
user2672165's user avatar

15 30 50 per page