File: none.rb

package info (click to toggle)
ruby-redis-cluster-client 0.10.0-1.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 208 kB
  • sloc: ruby: 2,214; makefile: 4
file content (27 lines) | stat: -rw-r--r-- 490 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# frozen_string_literal: true

class RedisClient
  class Cluster
    module ConcurrentWorker
      class None
        def new_group(size:)
          ::RedisClient::Cluster::ConcurrentWorker::Group.new(
            worker: self,
            queue: [],
            size: size
          )
        end

        def push(task)
          task.exec
        end

        def close; end

        def inspect
          "#<#{self.class.name} main thread only>"
        end
      end
    end
  end
end