Sha256: 41bf81f1b60ccdc760d8d4303436d21f48d38bc90c61457082243c7ef509edb6

Contents?: true

Size: 586 Bytes

Versions: 9

Compression:

Stored size: 586 Bytes

Contents

#
# !SLIDE :capture_code_output true
# One-way, asynchronous thread service

require 'example_helper'
begin
  Email.asir.transport = t =
    ASIR::Transport::Thread.new

  t.after_thread_new = lambda do | transport, message, thread |
    $stderr.puts "\n  #{$$}: Spawned Thread #{thread.inspect}"
  end

  pr Email.asir.send_email(:pdf_invoice,
                             :to => "user@email.com",
                             :customer => @customer)
end

# !SLIDE END
# EXPECT: : Spawned Thread
# EXPECT: : client process
# EXPECT: : Email.send_mail :pdf_invoice
# EXPECT: : pr: nil

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
asir-1.1.8 example/ex26.rb
asir-1.1.7 example/ex26.rb
asir-1.1.6 example/ex26.rb
asir-1.1.5 example/ex26.rb
asir-1.1.4 example/ex26.rb
asir-1.1.3 example/ex26.rb
asir-1.1.2 example/ex26.rb
asir-1.1.1 example/ex26.rb
asir-1.1.0 example/ex26.rb