From c3485187f689d4b7fb2b2cea5faf244769197441 Mon Sep 17 00:00:00 2001 From: Djomanix Date: Wed, 25 Jun 2014 19:09:19 -0400 Subject: [PATCH] Updated 'create_thread' function comments. Signed-off-by: Djomanix --- lib/pnacl.nit | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/pnacl.nit b/lib/pnacl.nit index 994bbdb..42a6b8c 100644 --- a/lib/pnacl.nit +++ b/lib/pnacl.nit @@ -726,6 +726,15 @@ end redef interface Object # Creates a new thread for Nit. + # + # This function launches the Nit main on a new thread. + # Its purpose is to allow Nit to be still operational after an exit when needed, + # because reloading the page may not be an option. + # + # Should only be used within the 'exit' before stopping the current thread + # when the Nit execution causes a crash. + # + # REQUIRE: g_nit_thread and WrapperNitMain are set. fun create_thread `{ pthread_create(&g_nit_thread, NULL, &WrapperNitMain, NULL); `} -- 1.7.9.5