Skip to content

Commit

Permalink
Don't report stacktraces for interruptions (#10698)
Browse files Browse the repository at this point in the history
Interruptions are OK now and shouldn't be reported as a warning.
This is confusing to devs.
  • Loading branch information
hubertp authored Jul 28, 2024
1 parent 446834b commit 73cb5d1
Showing 1 changed file with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,11 @@ class ReentrantLocking(logger: TruffleLogger) extends Locking {
lockTimestamp = acquireWriteCompilationLock(where)
callable.call()
} catch {
case ie: InterruptedException =>
case _: InterruptedException =>
logger.log(
Level.WARNING,
Level.FINE,
"Failed [{0}] to acquire lock: interrupted",
Array[Any](where.getSimpleName, ie)
Array[Any](where.getSimpleName)
)
null.asInstanceOf[T]
} finally {
Expand Down Expand Up @@ -139,11 +139,11 @@ class ReentrantLocking(logger: TruffleLogger) extends Locking {
lockTimestamp = acquireReadCompilationLock(where)
callable.call()
} catch {
case ie: InterruptedException =>
case _: InterruptedException =>
logger.log(
Level.WARNING,
Level.FINE,
"Failed [{0}] to acquire lock: interrupted",
Array[Any](where.getSimpleName, ie)
Array[Any](where.getSimpleName)
)
null.asInstanceOf[T]
} finally {
Expand Down Expand Up @@ -178,11 +178,11 @@ class ReentrantLocking(logger: TruffleLogger) extends Locking {
lockTimestamp = acquirePendingEditsLock(where)
callable.call()
} catch {
case ie: InterruptedException =>
case _: InterruptedException =>
logger.log(
Level.WARNING,
Level.FINE,
"Failed [{0}] to acquire lock: interrupted",
Array[Any](where.getSimpleName, ie)
Array[Any](where.getSimpleName)
)
null.asInstanceOf[T]
} finally {
Expand Down Expand Up @@ -216,11 +216,11 @@ class ReentrantLocking(logger: TruffleLogger) extends Locking {
) //acquireContextLock(contextId)
callable.call()
} catch {
case ie: InterruptedException =>
case _: InterruptedException =>
logger.log(
Level.WARNING,
Level.FINE,
"Failed [{0}] to acquire lock: interrupted",
Array[Any](where.getSimpleName, ie)
Array[Any](where.getSimpleName)
)
null.asInstanceOf[T]
} finally {
Expand Down Expand Up @@ -278,11 +278,11 @@ class ReentrantLocking(logger: TruffleLogger) extends Locking {
lockTimestamp = acquireFileLock(file, where)
callable.call()
} catch {
case ie: InterruptedException =>
case _: InterruptedException =>
logger.log(
Level.WARNING,
Level.FINE,
"Failed [{0}] to acquire lock: interrupted",
Array[Any](where.getSimpleName, ie)
Array[Any](where.getSimpleName)
)
null.asInstanceOf[T]
} finally {
Expand Down

0 comments on commit 73cb5d1

Please sign in to comment.