~ubuntu-branches/ubuntu/trusty/unity-scopes-api/trusty-proposed

« back to all changes in this revision

Viewing changes to src/scopes/internal/AbstractObject.cpp

  • Committer: Package Import Robot
  • Author(s): Ubuntu daily release, Pawel Stolowski
  • Date: 2014-02-11 17:55:05 UTC
  • mfrom: (1.1.8)
  • Revision ID: package-import@ubuntu.com-20140211175505-av3z0612p7o8w54b
Tags: 0.3.1+14.04.20140211.2-0ubuntu1
[ Pawel Stolowski ]
* [ Pawel Stolowski ]
* Added preliminary API for filters and departments.
* Changes to preview action activation API: support for widget id.
* Changes to Annotation API.
* Return ScopeProxy from Result::target_scope_proxy (replaces activation_scope_name).

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
    {
53
53
        // Lock needed because disconnect() may be called
54
54
        // from another thread, such as the reaper.
55
 
        lock_guard<mutex> lock(mutex_);
56
 
        assert(disconnect_func_);
57
 
        disconnect_func_();
 
55
        function<void()> disconnect_func;
 
56
        {
 
57
            lock_guard<mutex> lock(mutex_);
 
58
            assert(disconnect_func_);
 
59
            disconnect_func = disconnect_func_;
 
60
        }
 
61
        disconnect_func();
58
62
    }
59
63
    catch (...)
60
64
    {
61
65
        // Only happens if no servant with the corresponding identity is registered.
62
66
        // If we have concurrent calls into a servant, each of which tries to disconnect
63
 
        // the servant, only the first one succeeds; second and subsequent calls wil be ignored.
 
67
        // the servant, only the first one succeeds; second and subsequent calls will be ignored.
64
68
    }
65
69
}
66
70