Updated the example for pnacl, to make it work with the threading update
authorDjomanix <johan.kayser@viacesi.fr>
Tue, 10 Jun 2014 19:53:34 +0000 (15:53 -0400)
committerDjomanix <johan.kayser@viacesi.fr>
Thu, 12 Jun 2014 19:30:45 +0000 (15:30 -0400)
Signed-off-by: Djomanix <johan.kayser@viacesi.fr>

examples/pnacl/converter/converter.nit

index 4cbf103..bc07608 100644 (file)
@@ -18,7 +18,8 @@
 #
 # First imports the pnacl module
 # Then redefines the 'handle_dictionary' method
-# Finally creates a converter and initializes it
+# Creates a converter and initializes it
+# Finally checks for dictionaries
 
 import pnacl
 
@@ -123,5 +124,6 @@ class Converter
        end
 end
 
-var converter = new Converter
-converter.initialize # Needed to correctly set up Nit control over the Pepper API
+redef fun app do return once new Converter
+app.initialize # Needed to correctly set up Nit control over the Pepper API
+app.check_dictionary # Wait for dictionaries