This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Pager[A](seq: Sequential[A], chunkSize: Int) { | |
| self => | |
| import Pager._ | |
| private val ls: GrowingList[Chunk[A]] = mkGrowingList(seq, chunkSize) | |
| var pageNo: Int = _ | |
| def hasNext: Boolean = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import com.twitter.concurrent.{NamedPoolThreadFactory, Broker} | |
| import com.twitter.util.{ExecutorServiceFuturePool, FuturePool} | |
| import java.util.concurrent.{Executors, TimeUnit} | |
| import annotation.tailrec | |
| object RepeatTask { | |
| /** | |
| * Executes the "task" many times as much as possible within given "repeatMilliSecs". | |
| * The "task" must be thread safe, since it is called simultaneously. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import actors.threadpool.locks.{Condition, ReentrantLock} | |
| class EasyLock { | |
| val lock = new ReentrantLock | |
| def mkCondition(f: => Boolean): EasyCondition = { | |
| new EasyCondition(lock.newCondition(), f) | |
| } | |
| def apply[A](f: => A): A = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| javascript:var%20c=prompt("%E3%83%A2%E3%83%90%E3%82%B2%E3%83%BC%EF%BC%A9%EF%BC%A4");if(c)%20window.location.href="http://sp.pf.mbga.jp/12008305/?guid=ON&url=http%3A%2F%2F125.6.169.35%2Fidolmaster%2Fprofile%2Fshow%2F"+c+"%3Frnd%3D732740346"; |