Skip to content

Commit

Permalink
cleanup old code
Browse files Browse the repository at this point in the history
  • Loading branch information
bakkdoor committed Jun 20, 2012
1 parent 4ee8d83 commit c84ef8c
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 144 deletions.
1 change: 0 additions & 1 deletion lib/boot.fy
Expand Up @@ -36,7 +36,6 @@ require: "set"
require: "symbol" require: "symbol"
require: "stack" require: "stack"
require: "proxy" require: "proxy"
require: "thread_pool"
require: "fiber" require: "fiber"
require: "future" require: "future"
require: "struct" require: "struct"
Expand Down
41 changes: 0 additions & 41 deletions lib/future.fy
Expand Up @@ -185,47 +185,6 @@ class FutureSend {
} }
} }


class PooledFuture {
@@thread_pool = nil
@@pool_size = 10
WaitInterval = 0.1

def PooledFuture pool: n {
@@pool_size = match n {
case 0 -> 10
case _ -> n
}
}

def PooledFuture join! {
@@thread_pool join
}

def initialize: @block {
{ @@thread_pool = ThreadPool new: @@pool_size } unless: @@thread_pool
@@thread_pool execute: @block
}

def when_done: block {
PooledFuture new: {
block call: [value]
}
}

def && block {
when_done: block
}

def completed? {
@block complete?
}

def value {
{ Thread sleep: WaitInterval } until: { completed? }
@block completed_value
}
}

class FutureCollection { class FutureCollection {
include: Fancy Enumerable include: Fancy Enumerable


Expand Down
102 changes: 0 additions & 102 deletions lib/thread_pool.fy

This file was deleted.

0 comments on commit c84ef8c

Please sign in to comment.