concurrent_collections: Adding implementation of has method
authorFlorian Deljarry <deljarry.florian@gmail.com>
Mon, 27 May 2019 16:03:01 +0000 (12:03 -0400)
committerFlorian Deljarry <deljarry.florian@gmail.com>
Mon, 27 May 2019 16:33:11 +0000 (12:33 -0400)
Signed-off-by: Florian Deljarry <deljarry.florian@gmail.com>

lib/pthreads/concurrent_collections.nit

index 3c5ae98..a8b4bbc 100644 (file)
@@ -421,6 +421,14 @@ class ConcurrentArray[E]
                mutex.unlock
        end
 
+       redef fun has(e)
+       do
+               mutex.lock
+               var result = real_collection.has(e)
+               mutex.unlock
+               return result
+       end
+
        #
        ## The following method defs are conflict resolutions
        #