{"action":"created","issue":{"url":"https://api.github.com/repos/TextureGroup/Texture/issues/956","repository_url":"https://api.github.com/repos/TextureGroup/Texture","labels_url":"https://api.github.com/repos/TextureGroup/Texture/issues/956/labels{/name}","comments_url":"https://api.github.com/repos/TextureGroup/Texture/issues/956/comments","events_url":"https://api.github.com/repos/TextureGroup/Texture/issues/956/events","html_url":"https://github.com/TextureGroup/Texture/pull/956","id":328756857,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkyMjA1NTA5","number":956,"title":"[WIP] Implement ASDisplayTree to manage locking during tree-level operations","user":{"login":"Adlai-Holler","id":2466893,"node_id":"MDQ6VXNlcjI0NjY4OTM=","avatar_url":"https://avatars2.githubusercontent.com/u/2466893?v=4","gravatar_id":"","url":"https://api.github.com/users/Adlai-Holler","html_url":"https://github.com/Adlai-Holler","followers_url":"https://api.github.com/users/Adlai-Holler/followers","following_url":"https://api.github.com/users/Adlai-Holler/following{/other_user}","gists_url":"https://api.github.com/users/Adlai-Holler/gists{/gist_id}","starred_url":"https://api.github.com/users/Adlai-Holler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Adlai-Holler/subscriptions","organizations_url":"https://api.github.com/users/Adlai-Holler/orgs","repos_url":"https://api.github.com/users/Adlai-Holler/repos","events_url":"https://api.github.com/users/Adlai-Holler/events{/privacy}","received_events_url":"https://api.github.com/users/Adlai-Holler/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-06-02T16:20:20Z","updated_at":"2018-06-03T19:49:06Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/TextureGroup/Texture/pulls/956","html_url":"https://github.com/TextureGroup/Texture/pull/956","diff_url":"https://github.com/TextureGroup/Texture/pull/956.diff","patch_url":"https://github.com/TextureGroup/Texture/pull/956.patch"},"body":"Right now when we walk up or down a tree, there's no way to guarantee that we get a consistent picture without deadlocking.\r\n\r\nThis diff creates a new class `ASDisplayTree` which owns a lock and which performs all tree-level queries and mutations. A reference to the tree is pushed down to nodes when they enter the tree.\r\n\r\nTree modifications currently require us to take _three_ locks simultaneously – the source tree, the destination tree, and the node's property lock.\r\n\r\nStill need to come up with a testing scaffold and think through if there's a way to modify the tree without taking all three locks (although I think taking all three simultaneously is actually safe, since we use a deadlock-avoidant approach. \r\n\r\nAt this stage it would be great to take input! But it's also far from landing so feel free to ignore for now."},"comment":{"url":"https://api.github.com/repos/TextureGroup/Texture/issues/comments/394186500","html_url":"https://github.com/TextureGroup/Texture/pull/956#issuecomment-394186500","issue_url":"https://api.github.com/repos/TextureGroup/Texture/issues/956","id":394186500,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NDE4NjUwMA==","user":{"login":"pinterest-ios","id":23365208,"node_id":"MDQ6VXNlcjIzMzY1MjA4","avatar_url":"https://avatars3.githubusercontent.com/u/23365208?v=4","gravatar_id":"","url":"https://api.github.com/users/pinterest-ios","html_url":"https://github.com/pinterest-ios","followers_url":"https://api.github.com/users/pinterest-ios/followers","following_url":"https://api.github.com/users/pinterest-ios/following{/other_user}","gists_url":"https://api.github.com/users/pinterest-ios/gists{/gist_id}","starred_url":"https://api.github.com/users/pinterest-ios/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pinterest-ios/subscriptions","organizations_url":"https://api.github.com/users/pinterest-ios/orgs","repos_url":"https://api.github.com/users/pinterest-ios/repos","events_url":"https://api.github.com/users/pinterest-ios/events{/privacy}","received_events_url":"https://api.github.com/users/pinterest-ios/received_events","type":"User","site_admin":false},"created_at":"2018-06-03T19:49:06Z","updated_at":"2018-06-03T19:49:06Z","author_association":"COLLABORATOR","body":"<!--\n  0 Errors\n  6 Warnings: PR is classed as Work in Progr...\n  0 Messages\n  0 Markdowns\n-->\n<table>\n  <thead>\n    <tr>\n      <th width=\"50\"></th>\n      <th width=\"100%\" data-danger-table=\"true\" data-kind=\"Warning\">\n          6 Warnings\n      </th>\n     </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td>:warning:</td>\n      <td data-sticky=\"false\">PR is classed as Work in Progress</td>\n    </tr>\n    <tr>\n      <td>:warning:</td>\n      <td data-sticky=\"false\">This is a big PR, please consider splitting it up to ease code review.</td>\n    </tr>\n    <tr>\n      <td>:warning:</td>\n      <td data-sticky=\"false\">Any source code changes should have an entry in CHANGELOG.md or have #trivial in their title.</td>\n    </tr>\n    <tr>\n      <td>:warning:</td>\n      <td data-sticky=\"false\">Please ensure license is correct for ASDisplayTree.h:</p>\n<pre><code>//\n//  ASDisplayTree.h\n//  Texture\n//\n//  Copyright (c) 2018-present, Pinterest, Inc.  All rights reserved.\n//  Licensed under the Apache License, Version 2.0 (the \"License\");\n//  you may not use this file except in compliance with the License.\n//  You may obtain a copy of the License at\n//\n//      http://www.apache.org/licenses/LICENSE-2.0\n//\n</code></</td>\n    </tr>\n    <tr>\n      <td>:warning:</td>\n      <td data-sticky=\"false\">Please ensure license is correct for ASDisplayTree.mm:</p>\n<pre><code>//\n//  ASDisplayTree.mm\n//  Texture\n//\n//  Copyright (c) 2018-present, Pinterest, Inc.  All rights reserved.\n//  Licensed under the Apache License, Version 2.0 (the \"License\");\n//  you may not use this file except in compliance with the License.\n//  You may obtain a copy of the License at\n//\n//      http://www.apache.org/licenses/LICENSE-2.0\n//\n</code></</td>\n    </tr>\n    <tr>\n      <td>:warning:</td>\n      <td data-sticky=\"false\">Please ensure license is correct for ASDisplayTreeTests.m:</p>\n<pre><code>//\n//  ASDisplayTreeTests.m\n//  Texture\n//\n//  Copyright (c) 2018-present, Pinterest, Inc.  All rights reserved.\n//  Licensed under the Apache License, Version 2.0 (the \"License\");\n//  you may not use this file except in compliance with the License.\n//  You may obtain a copy of the License at\n//\n//      http://www.apache.org/licenses/LICENSE-2.0\n//\n</code></</td>\n    </tr>\n  </tbody>\n</table>\n\n<p align=\"right\" data-meta=\"generated_by_danger\">\n  Generated by :no_entry_sign: <a href=\"http://danger.systems/\">Danger</a>\n</p>\n"}}
{"actor":{"display_login":"pinterest-ios"}}