~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/table_cache_dictionary/table_cache.cc

  • Committer: Brian Aker
  • Date: 2010-11-23 07:02:38 UTC
  • mfrom: (1945.2.1 quick)
  • Revision ID: brian@tangent.org-20101123070238-1f31pgg7gvmytpr3
Refactor basic lock bits (ie, encapsulate!)

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
 
44
44
table_cache_dictionary::TableCache::Generator::Generator(drizzled::Field **arg) :
45
45
  drizzled::plugin::TableFunction::Generator(arg),
46
 
  is_primed(false)
 
46
  is_primed(false),
 
47
  scopedLock(table::Cache::singleton().mutex())
47
48
{
48
 
  LOCK_open.lock(); /* Optionally lock for remove tables from open_cahe if not in use */
49
49
 
50
50
  for (table::CacheMap::const_iterator iter= table::getCache().begin();
51
51
       iter != table::getCache().end();
58
58
 
59
59
table_cache_dictionary::TableCache::Generator::~Generator()
60
60
{
61
 
  LOCK_open.unlock(); /* Optionally lock for remove tables from open_cahe if not in use */
62
61
}
63
62
 
64
63
bool table_cache_dictionary::TableCache::Generator::nextCore()