• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ruby-concurrency / concurrent-ruby / #2711

16 Jun 2014 12:13PM UTC coverage: 45.896% (-50.5%) from 96.422%
#2711

push

jdantonio
Merge pull request #112 from ruby-concurrency/remove-old-actor

Remove old Actor

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

Source File
Press 'n' to go to next uncovered line, 'b' for previous

69.23
/lib/concurrent/options_parser.rb
1
module Concurrent
1✔
2

3
  # A mixin module for parsing options hashes related to gem-level configuration.
4
  module OptionsParser
1✔
5

6
    # Get the requested `Executor` based on the values set in the options hash.
7
    #
8
    # @param [Hash] opts the options defining the requested executor
9
    # @option opts [Executor] :executor (`nil`) when set use the given `Executor` instance
10
    # @option opts [Boolean] :operation (`false`) when true use the global operation pool
11
    # @option opts [Boolean] :task (`true`) when true use the global task pool
12
    #
13
    # @return [Executor] the requested thread pool (default: global task pool)
14
    def get_executor_from(opts = {})
1✔
15
      if opts[:executor]
1✔
UNCOV
16
        opts[:executor]
×
17
      elsif opts[:operation] == true || opts[:task] == false
1✔
UNCOV
18
        Concurrent.configuration.global_operation_pool
×
19
      else
20
        Concurrent.configuration.global_task_pool
1✔
21
      end
22
    end
23

24
    # Get the requested `Executor` based on the values set in the options hash.
25
    #
26
    # @param [Hash] opts the options defining the requested executor
27
    # @option opts [Executor] :task_executor (`nil`) when set use the given `Executor` instance
28
    #
29
    # @return [Executor] the requested thread pool (default: global task pool)
30
    def get_task_executor_from(opts = {})
1✔
UNCOV
31
      opts[:task_executor] || opts[:executor] || Concurrent.configuration.global_task_pool
×
32
    end
33

34
    # Get the requested `Executor` based on the values set in the options hash.
35
    #
36
    # @param [Hash] opts the options defining the requested executor
37
    # @option opts [Executor] :task_executor (`nil`) when set use the given `Executor` instance
38
    #
39
    # @return [Executor] the requested thread pool (default: global operation pool)
40
    def get_operation_executor_from(opts = {})
1✔
UNCOV
41
      opts[:operation_executor] || opts[:executor] || Concurrent.configuration.global_operation_pool
×
42
    end
43

44
    extend self
1✔
45
  end
46
end
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc