lib/ddtrace/writer.rb
# spawns a worker for spans; they share the same transport which is thread-safe
spawns a worker for spans; they share the same transport which is thread-safe
spawns a worker for spans ; they share the same transport which is thread - safe
def start
      @pid = Process.pid
      @trace_handler = ->(items, transport) { send_spans(items, transport) }
      @worker = Datadog::Workers::AsyncTransport.new(
        transport: @transport,
        buffer_size: @buff_size,
        on_trace: @trace_handler,
        interval: @flush_interval
      )
      @worker.start
    end
def start @pid = Process . pid @trace_handler = -> ( items , transport ) { send_spans ( items , transport ) } @worker = Datadog :: Workers :: AsyncTransport . new ( transport : @transport , buffer_size : @buff_size , on_trace : @trace_handler , interval : @flush_interval ) @worker . start end
spawns a worker for spans; they share the same transport which is thread-safe
spawns a worker for spans ; they share the same transport which is thread - safe