Method: MessageBus::Implementation#destroy
- Defined in:
- lib/message_bus.rb
#destroy ⇒ void
This method returns an undefined value.
Stops listening for publications and stops executing scheduled tasks. Mostly used in tests to destroy entire bus.
539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 |
# File 'lib/message_bus.rb', line 539 def destroy return if @destroyed backend_instance.global_unsubscribe backend_instance.destroy @mutex.synchronize do return if @destroyed @subscriptions ||= {} @destroyed = true end @subscriber_thread.join if @subscriber_thread timer.stop end |