push
1 of 2 new or added lines in 2 files covered. (50.0%)
1362 existing lines in 62 files now uncovered.1219 of 2656 relevant lines covered (45.9%)
0.98 hits per line
| 1 |
module Concurrent |
1✔ |
| 2 |
|
|
| 3 |
class PerThreadExecutor |
1✔ |
| 4 |
include Executor
|
1✔ |
| 5 |
|
|
| 6 |
def self.post(*args) |
1✔ |
|
UNCOV
7
|
raise ArgumentError.new('no block given') unless block_given? |
× |
|
UNCOV
8
|
Thread.new(*args) do |
× |
|
UNCOV
9
|
Thread.current.abort_on_exception = false |
× |
|
UNCOV
10
|
yield(*args)
|
× |
| 11 |
end
|
|
|
UNCOV
12
|
return true |
× |
| 13 |
end
|
|
| 14 |
|
|
| 15 |
def post(*args, &task) |
1✔ |
|
UNCOV
16
|
return PerThreadExecutor.post(*args, &task) |
× |
| 17 |
end
|
|
| 18 |
|
|
| 19 |
def <<(task) |
1✔ |
|
UNCOV
20
|
PerThreadExecutor.post(&task)
|
× |
|
UNCOV
21
|
return self |
× |
| 22 |
end
|
|
| 23 |
end
|
|
| 24 |
end
|