Skip to content

Not working with ActionMailer from Rails 3.2.3 #1

@pduersteler

Description

@pduersteler

I am trying to use ActionPool with ActionMailer from Rails 2.3.2 (ruby 1.9.3). It seems that every call to .deliver somehow stops the thread. I don't even get a hint when surrounding it in a rescue block, there is just a stop and that's it.

pool = ActionPool::Pool.new

2.times do
  pool.process do
    @log.debug "#{Thread.current} sending"
    ::SystemMailer.testmail('john@doe.com').deliver
    @log.debug "#{Thread.current} sent"
  end
end

pool.shutdown
@log.debug "pools shutdown"

Output:

#<Thread:0xadb4548> sending
#<Thread:0xadb5d30> sending
pools shutdown

This however works when doing Thread.new and joining them afterwards, without the use of ActionPool.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions