Sha256: 9df1bf81b7ff952a3102b236beaacc078c243276d1723ec95fef9c6b5f1527e8
Contents?: true
Size: 365 Bytes
Versions: 15
Compression:
Stored size: 365 Bytes
Contents
# encoding: UTF-8 require 'simultaneous' module Spontaneous module Rack class EventSource < ::Simultaneous::Rack::EventSource def push(client) @lock.synchronize { @clients << client } end alias_method :<<, :push def delete(client) @lock.synchronize { removed = @clients.delete(client) } end end end end
Version data entries
15 entries across 15 versions & 1 rubygems