<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -26,16 +26,21 @@ module AutoCode
   def self.included( mod )
     
     mod.instance_eval do
-
-      # First make sure we haven't already done this once
-      return unless @autocode.nil?
       
-      # Initialize bookkeeping variables needed by AutoCode
-      @autocode = { 
-        :constructors =&gt; Hash.new { |h,k| h[k] = [] },
-        :initializers =&gt; Hash.new { |h,k| h[k] = [] },
-        :loaded =&gt; []
-      }
+      AutoCode.monitor.enter
+      begin
+        # First make sure we haven't already done this once
+        return unless @autocode.nil?
+      
+        # Initialize bookkeeping variables needed by AutoCode
+        @autocode = { 
+          :constructors =&gt; Hash.new { |h,k| h[k] = [] },
+          :initializers =&gt; Hash.new { |h,k| h[k] = [] },
+          :loaded =&gt; []
+        }
+      ensure
+        AutoCode.monitor.exit
+      end
       
       def auto_constructor( key = true, &amp;block)
         @autocode[:constructors][ AutoCode.normalize( key ) ] &lt;&lt; block</diff>
      <filename>lib/autocode.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>7410d58a0aeceecf21c65d28cbd1b5174eeb4800</id>
    </parent>
  </parents>
  <author>
    <name>Matthew King</name>
    <email>automatthew@gmail.com</email>
  </author>
  <url>http://github.com/dyoder/autocode/commit/bda1d9faf061450b57723cdd77954ba841db7ee3</url>
  <id>bda1d9faf061450b57723cdd77954ba841db7ee3</id>
  <committed-date>2009-03-06T07:35:03-08:00</committed-date>
  <authored-date>2009-03-06T07:35:03-08:00</authored-date>
  <message>mutex around the initial #included work</message>
  <tree>f45407d3194084c5dae73925f953e78e55788d96</tree>
  <committer>
    <name>Matthew King</name>
    <email>automatthew@gmail.com</email>
  </committer>
</commit>
