Questions tagged [interrupted-exception]
210 questions
0
votes
2 answers
How to debug unexplained thread interruption in Java
I'm getting an InterruptedException from Jenkins, relevant part of stack trace:
java.lang.InterruptedException
at java.lang.Object.wait(Native Method)
at hudson.remoting.Request.call(Request.java:127)
at…

hyde
- 60,639
- 21
- 115
- 176
0
votes
1 answer
EBean with Scala on SBT (InterruptedException: sleep interrupted)
I am trying to run EBean with Scala on SBT and I get an error.
This is the code (a test from: http://www.avaje.org/ebean/getstarted_props.html#test):
object Main extends App {
val sql = "select count(*) as count from dual"
val row =…

Etam
- 4,553
- 10
- 40
- 60
0
votes
1 answer
Not able to stop execution
I have developed an application which is intended to allow users to execute queries.Once the user enters the query and clicks on execute button the control is passed to RMI server which in turn starts the thread.
User should be able to execute other…

happy
- 2,550
- 17
- 64
- 109
0
votes
1 answer
Propagate system call interruptions in threads
I'm running two python threads (import threading). Both of them are blocked on a open() call; in fact they try to open named pipes in order to write in them, so it's a normal behaviour to block until somebody try to read from the named pipe.
In…

deathiop
- 23
- 5
-1
votes
2 answers
Java: finally-block seems to be executed twice when InterruptedException is thrown in catch block
In the following code:
void foo() throws InterruptedException {
try {
f1();
}
catch (InterruptedException e) {
f2();
throw e;
}
finally {
f3(); //breakpoint hit twice
}
}
When…

A.G.
- 2,037
- 4
- 29
- 40
-1
votes
4 answers
Where should I put the throws InterruptedException for the sleep function in java
I've looked up where to put it and all I'm getting are mixed answers and the purpose of this is to create rudimentary for the alpha version of this game. Here is the code:
public class Intelijence {
public static void main(String[] args) {
…

Hunter Lindsey
- 59
- 6
-1
votes
1 answer
currentThread().interrupt() inside InterruptedException catch block?
While reading through someone else's code, I came across the following:
class Worker extends Thread {
....
public void run() {
try {
while ( true ) {
..... DO WORK .....
}
…

Mikepote
- 6,042
- 3
- 34
- 38
-1
votes
1 answer
why isnt a thread waiting for an object lock responsive to interruption?
why isn't a thread waiting for an object lock responsive to interruption? i did some search and read
interuppting blocked thread.
I understand arguments like in java, only methods can be forced to throw exceptions and the synchronized
blocks…

Thiru
- 157
- 1
- 2
- 11
-1
votes
1 answer
Error in run() method when using Thread.sleep()
I am trying to run an Elevator instance in its own thread. The run() method is being called, but there must be some error in my code that is preventing it from running. My code compiles and runs without errors, but the "Elevator starting up" is…

clenard
- 188
- 2
- 16
-1
votes
2 answers
java thread stopped during OS initiated shutdown (contradicts JAVA docs!)
java.lang.Thread.setDaemon(boolean)
The Java Virtual Machine exits when the only threads running are all daemon threads.
YET IN THE BELOW CODE "SAFELY SHUTTING DOWN" never happens while interrupting(OS style) the process
and no i'm not using…

user3338098
- 907
- 1
- 17
- 38
-1
votes
1 answer
A very unclear error that sometimes interrupts my thread in Java
I know that I should provide with enough information for a special bug. But it is not possible to reproduce it. I have a highly multithreaded program. I have a thread with an infinite while loop. No part of the program can interrupt this thread. I…

Johnny
- 1,509
- 5
- 25
- 38
-2
votes
3 answers
Detect Go routine interruption
Is there a way to detect if a go routine was interrupted while it was executing? I would like something similar to InterruptedException in Java: https://docs.oracle.com/javase/8/docs/api/java/lang/InterruptedException.html

Murky
- 21
- 3
-2
votes
2 answers
why doesnt thread.sleep stop at the first catch?
public static void main(String s[])
{
Thread t=Thread.currentThread();
t.setName("main");
try
{
for(int i=0;i<=5;i++)
{
System.out.println(i);
Thread.sleep(1000);//interrupted exception(System…

Aakash
- 11
- 2
-3
votes
1 answer
Uninterrupted catch block for Interruptedexception
I have written the following java code for runnable approach for creating new thread and getting errors as given below after the codes. If anyone can help me sort out this thing would be appreciated.
The errors are as follows:

suraj j
- 23
- 13
-3
votes
2 answers
Why is a try catch statement required?
Why is a try/catch exception handling statement required in Java for the below line:
TimeUnit.MILLISECONDS.sleep(250);
I just want my code to sleep for 250 milliseconds before executing the next line. Why is a try-catch statement required? I can’t…

codepurveyor
- 43
- 1
- 8