I'd move this into:

    val select = new Task {
      val doSelect: () ⇒ Int = ...
      def tryRun() {
        if (doSelect() > 0) {
           …
    }

So you don't need to close over "this" to call the function.