[folks] eds: Remove unnecessary locking
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [folks] eds: Remove unnecessary locking
- Date: Tue, 28 Aug 2012 21:03:43 +0000 (UTC)
commit 5df5c3f4cacf16c67c4b1493a3008b418ae98b2c
Author: Philip Withnall <philip tecnocode co uk>
Date: Sun Aug 26 23:43:26 2012 +0100
eds: Remove unnecessary locking
It didnât achieve anything.
backends/eds/lib/edsf-persona-store.vala | 16 +++++++---------
1 files changed, 7 insertions(+), 9 deletions(-)
---
diff --git a/backends/eds/lib/edsf-persona-store.vala b/backends/eds/lib/edsf-persona-store.vala
index 05cdc17..cce55f7 100644
--- a/backends/eds/lib/edsf-persona-store.vala
+++ b/backends/eds/lib/edsf-persona-store.vala
@@ -2099,17 +2099,15 @@ public class Edsf.PersonaStore : Folks.PersonaStore
private void _contacts_added_cb (GLib.List<E.Contact> contacts)
{
var added_personas = new HashSet<Persona> ();
- lock (this._personas)
+
+ foreach (E.Contact c in contacts)
{
- foreach (E.Contact c in contacts)
+ var iid = Edsf.Persona.build_iid_from_contact (this.id, c);
+ if (this._personas.has_key (iid) == false)
{
- var iid = Edsf.Persona.build_iid_from_contact (this.id, c);
- if (this._personas.has_key (iid) == false)
- {
- var persona = new Persona (this, c);
- this._personas.set (persona.iid, persona);
- added_personas.add (persona);
- }
+ var persona = new Persona (this, c);
+ this._personas.set (persona.iid, persona);
+ added_personas.add (persona);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]