From: Joel VanderWerf Date: 2008-07-22T04:23:26+09:00 Subject: Re: Thread-local global variables? Earle Clubb wrote: > Is it possible to define a variable whose value is global within a > particular each thread (including the main thread), yet distinct between > threads? For example, I've tried this: the closest approximation is thread-locals: thread = Thread.current thread[:my_var] = "value" (I've often thought it would be nice to have a syntax for per-thread globals, like $_x or something.) -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407