From: Florian Deljarry Date: Mon, 27 May 2019 16:03:01 +0000 (-0400) Subject: concurrent_collections: Adding implementation of has method X-Git-Url: http://nitlanguage.org concurrent_collections: Adding implementation of has method Signed-off-by: Florian Deljarry --- diff --git a/lib/pthreads/concurrent_collections.nit b/lib/pthreads/concurrent_collections.nit index 3c5ae98..a8b4bbc 100644 --- a/lib/pthreads/concurrent_collections.nit +++ b/lib/pthreads/concurrent_collections.nit @@ -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 #