Always dispatch clientResolved() on the dobjmgr thread, even if the client is
already resolved and we're being called from a non-dobjmgr thread. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4744 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -231,13 +231,19 @@ public class ClientManager
|
||||
* {@link #releaseClientObject} when the caller is finished with the client object.
|
||||
*/
|
||||
public synchronized void resolveClientObject (
|
||||
Name username, final ClientResolutionListener listener)
|
||||
final Name username, final ClientResolutionListener listener)
|
||||
{
|
||||
// look to see if the client object is already resolved
|
||||
ClientObject clobj = _objmap.get(username);
|
||||
final ClientObject clobj = _objmap.get(username);
|
||||
if (clobj != null) {
|
||||
clobj.reference();
|
||||
listener.clientResolved(username, clobj);
|
||||
// report that the client is resolved on the dobjmgr thread to provide equivalent
|
||||
// behavior to the case where we actually have to do the resolution
|
||||
PresentsServer.omgr.postRunnable(new Runnable() {
|
||||
public void run () {
|
||||
clobj.reference();
|
||||
listener.clientResolved(username, clobj);
|
||||
}
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user