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