Class: Aws::Crt::IO::EventLoopGroup

Inherits:
Object
  • Object
show all
Includes:
ManagedNative
Defined in:
lib/aws-crt/io/event_loop_group.rb

Overview

A collection of event-loops. An event-loop is a thread for doing async work, such as I/O. Classes that need to do async work will ask the EventLoopGroup for an event-loop to use.

Instance Method Summary collapse

Methods included from ManagedNative

included, #manage_native, #native, #native_set?, #release

Constructor Details

#initialize(max_threads = nil) ⇒ EventLoopGroup

Returns a new instance of EventLoopGroup.



40
41
42
43
44
45
46
47
# File 'lib/aws-crt/io/event_loop_group.rb', line 40

def initialize(max_threads = nil)
  @options = EventLoopGroupOptions.new(max_threads)

  manage_native do
    Aws::Crt::Native.event_loop_group_new(@options.native)
  end
  Aws::Crt::Native.event_loop_group_acquire(@native)
end