Question: I am using an alert to perform a Segue to another view.

```
                let defaultAction = UIAlertAction(title: "Proceed", style: .Default, handler: { (UIAlertAction) -> Void in

                    performSegueWithIdentifier("proceed", sender: self)

                })

```

I just can't figure out why I get the error: 

```
Extra argument 'sender' in call

```

The sender should be just self, right? 
This error is driving me crazy for hours now, I can't figure out what's wrong! 
Any help is appreciated! Thanks!

Answer: 
ConcurrentHashMap uses internally divides buckets into segments and one particular segment can be locked by a thread for writing purpose.

Segment is nothing but a static class which is specialized version of hash tables and implements Reentrantlock to simplify locking as

```
static class Segment<K,V> extends ReentrantLock implements Serializable {
        private static final long serialVersionUID = 2249069246763182397L;
        final float loadFactor;
        Segment(float lf) { this.loadFactor = lf; }
}

```

Segments's constructor calls ReentrantLock's no arg constructor and creates a non fair lock.
Two main features of ConcurrentHashMap is:

* While writing on ConcurrentHashMap, locks only a part of the map
* Reads can generally happened without locking.

its possible to have two parallel threads writing to the **ConcurrentHashMap** at the same time. As per the default implementation of ConcurrentHashMap, atmost 16 threads can write & read in parallel. But the worst case is, if the two objects lie in the same segment or partition of **ConcurrentHashMap**, then parallel write would not be possible.