Permalink
Browse files

make normal cancel async

  • Loading branch information...
1 parent 9c2f37c commit 57e437c1ecee8905535597e5d7f3491390e251fa @freels freels committed Sep 5, 2010
Showing with 0 additions and 7 deletions.
  1. +0 −7 src/main/scala/com/twitter/querulous/query/SqlQuery.scala
@@ -74,11 +74,6 @@ class SqlQuery(connection: Connection, query: String, params: Any*) extends Quer
}
def cancel() {
- cancelAsynchronously().await()
- }
-
- def cancelAsynchronously() = {
- val cancelLatch = new java.util.concurrent.CountDownLatch(1)
val cancelThread = new Thread("SQL query cancellation") {
override def run() {
try {
@@ -94,11 +89,9 @@ class SqlQuery(connection: Connection, query: String, params: Any*) extends Quer
clobberConnection(connection)
}
} catch { case e: TimeoutException => }
- cancelLatch.countDown()
}
}
cancelThread.start()
- cancelLatch
}
private def withStatement[A](f: => A) = {

0 comments on commit 57e437c

Please sign in to comment.