Can't interrupt a thread doing BRPOPLPUSH.
See original GitHub issueI would like to be able to interrupt()
a thread doing BRPOPLPUSH. Specifically, if nothing has been popped yet, I want jedis.brpoplpush()
to be able to throw an InterruptedException
, so the thread can die.
This has been a source of hangs in my program, so for the moment I’m working around this with a manual while { jedis.rpoplpush(); sleep(); }
that is interruptible.
Specifically, if nothing has yet been popped (e.g., a work queue is empty), it would be good if the command could be interrupted.
Issue Analytics
- State:
- Created 10 years ago
- Comments:29
Top Results From Across the Web
Can't interrupt a thread doing BRPOPLPUSH. #493 - GitHub
I would like to be able to interrupt() a thread doing BRPOPLPUSH. Specifically, if nothing has been popped yet, I want jedis.brpoplpush() to ......
Read more >Blocking Requests Interrupts - Google Groups
Since the thread blocks on brpoplpush/blpop waiting for a log event, when we stop the application we want to interrupt the blocking event...
Read more >Why can't Thread.interrupt() interrupt a thread trying to acquire ...
Clearly, a synchronized block does not declare it, therefore it is impossible to interrupt a thread while it is waiting to acquire a...
Read more >Pausing and interrupting threads | Microsoft Learn
Learn how to pause & interrupt threads in .NET. Learn how to use methods like Thread.Sleep & Thread.Interrupt, & exceptions such as ...
Read more >How to Stop Threads in Java. Best Practices and Examples.
There's very little an external caller can do in this situation. (I cover non-standard cancellation at the end of this post.) Thread.Interrupt() ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
+1 for
InterruptedException
Is it expected behavior to get no exception at all when I am stopping a web app with
tomcat stop
.On a jax-rs web app having this context with below Thread is not triggering any exception at all.