title: Sidekiq threads accessing global variable
body: <p>I have a controller that spins off 6 sidekiq threads for faster parallel processing of a large file. Before that however I want to provide these threads with a few variables that should be available accross all threads because they variables themselves are fairly memory intensive. (it is only reading from that, not writing, so the concurrency issues doesn't exist)</p>
  
  <p>In other words my controller looks like this</p>
  
  <pre><code>def foo
    $bar1 = ....
    $bar2 = ...
    worker.perform_async()...
    worker2.perform_async()...
  end
  </code></pre>
  
  <p>I don't want to put those global vars into the perform methods because serializing those to redis chokes the entire thing. My issue is that the workers cannot see these variables and die because of a no method error (i.e. trying to call .first on on of them gives that error because the var is nil for the workers).</p>
  
  <p>How come? Is there any other way to do this that won't kill my memory? (i.e. I don't want to take up most of the mem with 6x the same large array)</p>