diff --git a/lib/modules/Thread.pmod b/lib/modules/Thread.pmod
index 5da43ac968d33e8473b37133cf7e3d3959f24aa2..f61f6fab457c73e6e8daee05176c95c16e16caf6 100644
--- a/lib/modules/Thread.pmod
+++ b/lib/modules/Thread.pmod
@@ -1022,6 +1022,38 @@ optional class Mutex
     locks++;
     return MutexKey (dec_locks);
   }
+
+  Condition condition ()
+  {
+    return Condition(this);
+  }
+}
+
+// Fallback implementation of Thread.Condition.
+class Condition (protected Mutex|void mutex)
+{
+  variant void wait(MutexKey key, void|int|float seconds)
+  {
+    if (!seconds || seconds == 0.0) {
+      // To be really accurate we should hang now, but somehow
+      // that doesn't seem too useful.
+      error ("Deadlock detected.\n");
+    }
+    sleep(seconds);
+  }
+
+  variant void wait(MutexKey key, int seconds, int nanos)
+  {
+    wait(key, seconds + nanos*1e-9);
+  }
+
+  void signal()
+  {
+  }
+
+  void broadcast()
+  {
+  }
 }
 
 // Fallback implementation of Thread.Fifo.