nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b84161a
)
lib/core: intro `Task`
author
Alexis Laferrière
<alexis.laf@xymus.net>
Tue, 3 Nov 2015 17:42:31 +0000
(12:42 -0500)
committer
Alexis Laferrière
<alexis.laf@xymus.net>
Tue, 3 Nov 2015 18:04:30 +0000
(13:04 -0500)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
lib/core/kernel.nit
patch
|
blob
|
history
diff --git
a/lib/core/kernel.nit
b/lib/core/kernel.nit
index
650360a
..
84bd844
100644
(file)
--- a/
lib/core/kernel.nit
+++ b/
lib/core/kernel.nit
@@
-1067,3
+1067,14
@@
extern class Pointer
# Free the memory pointed by this pointer
fun free `{ free(self); `}
end
+
+# Task with a `main` method to be implemented by subclasses
+#
+# This class is provided for compatibility between different parallelization systems.
+# It can be used to run a fragment of code on a different thread and
+# to register a reaction to UI events.
+interface Task
+
+ # Main method of this task
+ fun main do end
+end