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