From 95a0dd3a0b0311720cc0a5c7bc2ec77b9155aee5 Mon Sep 17 00:00:00 2001 From: Florian Deljarry Date: Mon, 27 May 2019 12:03:01 -0400 Subject: [PATCH] concurrent_collections: Adding implementation of has method Signed-off-by: Florian Deljarry --- lib/pthreads/concurrent_collections.nit | 8 ++++++++ 1 file changed, 8 insertions(+) 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 # -- 1.7.9.5