Method: MGit::Workspace.concurrent_enumerate
- Defined in:
- lib/m-git/workspace.rb
.concurrent_enumerate(array) ⇒ Object
并发遍历
470 471 472 473 474 475 476 477 478 479 480 |
# File 'lib/m-git/workspace.rb', line 470 def concurrent_enumerate(array) begin max_concurrent_count = MGitConfig.query_with_key(root, :maxconcurrentcount) rescue Error => e Foundation.help!(e.msg) end array.peach(max_concurrent_count) { |item| yield(item) if block_given? } end |