tests: add some runtime error in nitin.input
[nit.git] / lib / pthreads / concurrent_collections.nit
index 00201a9..e0c53af 100644 (file)
@@ -26,7 +26,7 @@
 # - [x] `ConcurrentList`
 # - [ ] `ConcurrentHashMap`
 # - [ ] `ConcurrentHashSet`
-# - [ ] `ConcurrentContainer`
+# - [ ] `ConcurrentRef`
 # - [ ] `ConcurrentQueue`
 #
 # Introduced collections specialize their critical methods according to the
@@ -161,10 +161,10 @@ abstract class ConcurrentCollection[E]
                return r
        end
 
-       redef fun join(sep)
+       redef fun join(sep, last_sep)
        do
                mutex.lock
-               var r = real_collection.join(sep)
+               var r = real_collection.join(sep, last_sep)
                mutex.unlock
                return r
        end
@@ -492,4 +492,19 @@ class ConcurrentList[E]
                real_collection.unshift(e)
                mutex.unlock
        end
+
+       redef fun push(e)
+       do
+               mutex.lock
+               real_collection.push(e)
+               mutex.unlock
+       end
+
+       redef fun shift
+       do
+               mutex.lock
+               var value = real_collection.shift
+               mutex.unlock
+               return value
+       end
 end