in reply to Thread local variables in Thread::Pool::Simple

I guess what you are really asking is 'how can I create a thread-local variable that is accessible from 'pre', 'do' and 'post'. Why are you not doing everything inside the 'do' function?
  • Comment on Re: Thread local variables in Thread::Pool::Simple

Replies are listed 'Best First'.
Re^2: Thread local variables in Thread::Pool::Simple
by Annirak (Novice) on Sep 18, 2009 at 16:31 UTC
    It didn't make a lot of sense to open and close a sqlite database handle for every job that comes through. I figured that each thread should have a sqlite handle that is persistent over the life of the thread.