Method: ApplicationInsights::Channel::AsynchronousSender#start
- Defined in:
- lib/application_insights/channel/asynchronous_sender.rb
#start ⇒ Object
Calling this method will create a worker thread that checks the SenderBase#queue every #send_interval seconds for a total duration of #send_time seconds for new items. If a worker thread has already been created, calling this method does nothing.
53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/application_insights/channel/asynchronous_sender.rb', line 53 def start @start_notification_processed = false # Maintain one working thread at one time unless @work_thread @lock_work_thread.synchronize do unless @work_thread local_send_interval = [@send_interval, 0.1].max @send_remaining_time = [@send_time, local_send_interval].max @work_thread = Thread.new { run } @work_thread.abort_on_exception = false end end end end |