@@ -21,38 +21,10 @@ package object io {
21
21
type ManifestResources = scala.reflect.io.ManifestResources
22
22
type Path = scala.reflect.io.Path
23
23
val Path = scala.reflect.io.Path
24
- val Streamable = scala.reflect.io.Streamable
25
24
type VirtualDirectory = scala.reflect.io.VirtualDirectory
26
25
type VirtualFile = scala.reflect.io.VirtualFile
27
26
type ZipArchive = scala.reflect.io.ZipArchive
28
- val ZipArchive = scala.reflect.io.ZipArchive
29
27
type FileZipArchive = scala.reflect.io.FileZipArchive
30
28
type JManifest = java.util.jar.Manifest
31
29
type JFile = java.io.File
32
-
33
- implicit def enrichManifest (m : JManifest ): Jar .WManifest = Jar .WManifest (m)
34
- private lazy val daemonThreadPool = DaemonThreadFactory .newPool()
35
-
36
- def runnable (body : => Unit ): Runnable = new Runnable { override def run () = body }
37
- def callable [T ](body : => T ): Callable [T ] = new Callable [T ] { override def call () = body }
38
- def spawn [T ](body : => T ): Future [T ] = daemonThreadPool submit callable(body)
39
- def submit (runnable : Runnable ) = daemonThreadPool submit runnable
40
-
41
- // Create, start, and return a daemon thread
42
- def daemonize (body : => Unit ): Thread = newThread(_ setDaemon true )(body)
43
- def newThread (f : Thread => Unit )(body : => Unit ): Thread = {
44
- val thread = new Thread (runnable(body))
45
- f(thread)
46
- thread.start
47
- thread
48
- }
49
-
50
- // Set a timer to execute the given code.
51
- def timer (seconds : Int )(body : => Unit ): Timer = {
52
- val alarm = new Timer (true ) // daemon
53
- val tt = new TimerTask { def run () = body }
54
-
55
- alarm.schedule(tt, seconds * 1000 )
56
- alarm
57
- }
58
30
}
0 commit comments