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