nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
50a5882
)
Added 'create_thread' function to enable thread creation after a exit.
author
Djomanix
<johan.kayser@viacesi.fr>
Mon, 23 Jun 2014 18:28:09 +0000
(14:28 -0400)
committer
Djomanix
<johan.kayser@viacesi.fr>
Mon, 23 Jun 2014 18:28:09 +0000
(14:28 -0400)
Signed-off-by: Djomanix <johan.kayser@viacesi.fr>
lib/pnacl.nit
patch
|
blob
|
history
diff --git
a/lib/pnacl.nit
b/lib/pnacl.nit
index
fde40f3
..
994bbdb
100644
(file)
--- a/
lib/pnacl.nit
+++ b/
lib/pnacl.nit
@@
-725,7
+725,12
@@
class PnaclApp
end
redef interface Object
- # Calls 'pthread_exit on current thread
+ # Creates a new thread for Nit.
+ fun create_thread `{
+ pthread_create(&g_nit_thread, NULL, &WrapperNitMain, NULL);
+ `}
+
+ # Calls 'pthread_exit on current thread.
fun exit_thread(exit_value: Int) `{
pthread_exit((void*) exit_value);
`}