Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

race condition? #56

Open
ghost opened this issue May 12, 2017 · 0 comments
Open

race condition? #56

ghost opened this issue May 12, 2017 · 0 comments

Comments

@ghost
Copy link

ghost commented May 12, 2017

suppose one subscribed for an ParseObject with objectID = X then in the same time on executing the following line, the subscriber change the object in another thraed and call saveInBackground, it seem in such situation race condition can be occurred ?

 private <T extends ParseObject> void handleObjectEvent(Subscription.Event event, JSONObject jsonObject) throws JSONException {
        final int requestId = jsonObject.getInt("requestId");
        final Subscription<T> subscription = subscriptionForRequestId(requestId);
        if (subscription != null) {
             --->. **T object = ParseObject.fromJSON(jsonObject.getJSONObject("object"), subscription.getQueryState().className(), ParseDecoder.get(), subscription.getQueryState().selectedKeys());**
           
        }
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants