# File lib/nats/client.rb, line 233 def start(*args, &blk) @reactor_was_running = EM.reactor_running? unless (@reactor_was_running || blk) raise(Error, "EM needs to be running when NATS.start is called without a run block") end # Setup optimized select versions if EM.epoll? EM.epoll elsif EM.kqueue? EM.kqueue elsif EM.library_type == :java # No warning needed, we're using Java NIO else Kernel.warn('Neither epoll nor kqueue are supported, performance may be impacted') end EM.run { @client = connect(*args, &blk) } end