search for: meta_method

Displaying 1 result from an estimated 1 matches for "meta_method".

Did you mean: delta_method
2008 Feb 03
1
Defer multiple methods within the same worker to the thread pool?
...ll the following code work? def method_1(args) thread_pool.defer(args) do |args| #work end end def method_2(args) thread_pool.defer(args) do |args| #work end end . . . or, should I have one "meta"-method and pass which sub-method to perform via args? def meta_method(args) thread_pool.defer(args) do |args| if args[:method] == "method_1" #do work end if args[:method] == "method_2" #do work end end end Thanks, Ben