Displaying 1 result from an estimated 1 matches for "process_pdf".
Did you mean:
process_id
2008 May 09
1
register_status for excess thread_pool?
Hi,
Newbie here. I''ve got a worker (for generating PDF reports) that
uses the "thread_pool" to allow processing multiple reports
simultaneously and queue up any requests that exceed the thread
pool (pool_size = 10 currently).
def process_pdf(user)
thread_pool.defer(user) do |user|
makepdf(user)
end
end
My question is: I use a mutex to handle synchronizing the
register_status. This works fine:
def makepdf(user)
txt = user.to_s + " started"
save_status(user, :progress, txt)
do_report(...