Sha256: 20e3fa41d4e07df736af7e84cb150e3ffc01421026194799b9647df4856bccd8

Contents?: true

Size: 568 Bytes

Versions: 7

Compression:

Stored size: 568 Bytes

Contents

# frozen_string_literal: true

# Released under the MIT License.
# Copyright, 2020-2022, by Samuel Williams.

require_relative 'notify/pipe'
require_relative 'notify/socket'
require_relative 'notify/console'

module Async
	module Container
		module Notify
			@client = nil
			
			# Select the best available notification client.
			# We cache the client on a per-process basis. Because that's the relevant scope for process readiness protocols.
			def self.open!
				@client ||= (
					Pipe.open! ||
					Socket.open! ||
					Console.open!
				)
			end
		end
	end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
async-container-0.18.3 lib/async/container/notify.rb
async-container-0.18.2 lib/async/container/notify.rb
async-container-0.18.1 lib/async/container/notify.rb
async-container-0.18.0 lib/async/container/notify.rb
async-container-0.17.1 lib/async/container/notify.rb
async-container-0.17.0 lib/async/container/notify.rb
async-container-0.16.13 lib/async/container/notify.rb