!7 cmodule IndexedSimpleWikipedia > DynPrintLog { transient volatile Map theMap; transient volatile bool loadError; start { thread { try { theMap = indexedSimpleWikipedia_fast(); print("Have " + n2(theMap, "topic") + "."); print("Ready."); } on fail { loadError = true; } } dm_registerAs('indexedSimpleWikipedia); } void waittt { if (theMap == null) { print("Waiting for Wikipedia to be loaded..."); while (!loadError && theMap == null && licensed()) { sleepSeconds(1.0); } } } // API S textForTopic(S topic) { waittt(); ret getString text(mapGet(theMap, topic)); } Set topics() { waittt(); ret keys(theMap); } }