nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Introduces JoinTask, joinabale tasks
[nit.git]
/
lib
/
pthreads
/
concurrent_collections.nit
diff --git
a/lib/pthreads/concurrent_collections.nit
b/lib/pthreads/concurrent_collections.nit
index
67e6765
..
d55bad0
100644
(file)
--- a/
lib/pthreads/concurrent_collections.nit
+++ b/
lib/pthreads/concurrent_collections.nit
@@
-499,4
+499,12
@@
class ConcurrentList[E]
real_collection.push(e)
mutex.unlock
end
+
+ redef fun shift
+ do
+ mutex.lock
+ var value = real_collection.shift
+ mutex.unlock
+ return value
+ end
end