{"action":"created","comment":{"url":"https://api.github.com/repos/Amanieu/parking_lot/pulls/comments/341632706","pull_request_review_id":310535213,"id":341632706,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDM0MTYzMjcwNg==","diff_hunk":"@@ -13,12 +13,25 @@\n #![warn(rust_2018_idioms)]\n #![cfg_attr(feature = \"nightly\", feature(asm))]\n \n+cfg_if::cfg_if! {\n+    if #[cfg(target_arch = \"wasm32\")] {","path":"src/lib.rs","position":5,"original_position":5,"commit_id":"8fa2fd35fd8c74c7e959744b1ac47987cdd47f53","original_commit_id":"8fa2fd35fd8c74c7e959744b1ac47987cdd47f53","user":{"login":"bjorn3","id":17426603,"node_id":"MDQ6VXNlcjE3NDI2NjAz","avatar_url":"https://avatars1.githubusercontent.com/u/17426603?v=4","gravatar_id":"","url":"https://api.github.com/users/bjorn3","html_url":"https://github.com/bjorn3","followers_url":"https://api.github.com/users/bjorn3/followers","following_url":"https://api.github.com/users/bjorn3/following{/other_user}","gists_url":"https://api.github.com/users/bjorn3/gists{/gist_id}","starred_url":"https://api.github.com/users/bjorn3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bjorn3/subscriptions","organizations_url":"https://api.github.com/users/bjorn3/orgs","repos_url":"https://api.github.com/users/bjorn3/repos","events_url":"https://api.github.com/users/bjorn3/events{/privacy}","received_events_url":"https://api.github.com/users/bjorn3/received_events","type":"User","site_admin":false},"body":"Maybe add\r\n\r\n```rust\r\n#[cfg(all(target_arch = \"wasm32\", target_feature = \"atomics\"))]\r\ncompile_error!(\"parking_lot doesnt yet support multi threaded wasm\");\r\n```\r\n\r\nAlso atomic.notify and atomic.wait are exposed on nightly: https://doc.rust-lang.org/stable/core/arch/wasm32/index.html Normal atomics are accessable using the Atomic* types.","created_at":"2019-11-01T15:47:40Z","updated_at":"2019-11-01T15:47:41Z","html_url":"https://github.com/Amanieu/parking_lot/pull/187#discussion_r341632706","pull_request_url":"https://api.github.com/repos/Amanieu/parking_lot/pulls/187","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/Amanieu/parking_lot/pulls/comments/341632706"},"html":{"href":"https://github.com/Amanieu/parking_lot/pull/187#discussion_r341632706"},"pull_request":{"href":"https://api.github.com/repos/Amanieu/parking_lot/pulls/187"}},"in_reply_to_id":341617301},"pull_request":{"url":"https://api.github.com/repos/Amanieu/parking_lot/pulls/187","id":335390446,"node_id":"MDExOlB1bGxSZXF1ZXN0MzM1MzkwNDQ2","html_url":"https://github.com/Amanieu/parking_lot/pull/187","diff_url":"https://github.com/Amanieu/parking_lot/pull/187.diff","patch_url":"https://github.com/Amanieu/parking_lot/pull/187.patch","issue_url":"https://api.github.com/repos/Amanieu/parking_lot/issues/187","number":187,"state":"open","locked":false,"title":"wasm implementation of RawMutex and RawRwlock using UnsafeCell","user":{"login":"cormacrelf","id":378760,"node_id":"MDQ6VXNlcjM3ODc2MA==","avatar_url":"https://avatars3.githubusercontent.com/u/378760?v=4","gravatar_id":"","url":"https://api.github.com/users/cormacrelf","html_url":"https://github.com/cormacrelf","followers_url":"https://api.github.com/users/cormacrelf/followers","following_url":"https://api.github.com/users/cormacrelf/following{/other_user}","gists_url":"https://api.github.com/users/cormacrelf/gists{/gist_id}","starred_url":"https://api.github.com/users/cormacrelf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cormacrelf/subscriptions","organizations_url":"https://api.github.com/users/cormacrelf/orgs","repos_url":"https://api.github.com/users/cormacrelf/repos","events_url":"https://api.github.com/users/cormacrelf/events{/privacy}","received_events_url":"https://api.github.com/users/cormacrelf/received_events","type":"User","site_admin":false},"body":"This is very rough, but it was borne out of necessity. Essentially, parking is not something you can do in wasm, so I was encountering flurries of parking_lot panics, and not just from #166.\r\n\r\nSo, this reimplements RawMutex and RawRwLock in the same way std has vastly simplified implementations for wasm. There's a bit of cruft, and I can't claim to understand the meaning of the translated `cmpxchg` in RwLock but it seems to work, and doesn't panic all the time. Clearly it needs more eyes on it though.\r\n\r\nQuestions\r\n\r\n* Does it actually need the deadlock calls? I think the deadlock system might be using Instant::now.","created_at":"2019-11-01T12:02:37Z","updated_at":"2019-11-01T15:47:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e125173394625ffb6bdc4933c24c558d5b92d1f8","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Amanieu/parking_lot/pulls/187/commits","review_comments_url":"https://api.github.com/repos/Amanieu/parking_lot/pulls/187/comments","review_comment_url":"https://api.github.com/repos/Amanieu/parking_lot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Amanieu/parking_lot/issues/187/comments","statuses_url":"https://api.github.com/repos/Amanieu/parking_lot/statuses/8fa2fd35fd8c74c7e959744b1ac47987cdd47f53","head":{"label":"cormacrelf:wasm32","ref":"wasm32","sha":"8fa2fd35fd8c74c7e959744b1ac47987cdd47f53","user":{"login":"cormacrelf","id":378760,"node_id":"MDQ6VXNlcjM3ODc2MA==","avatar_url":"https://avatars3.githubusercontent.com/u/378760?v=4","gravatar_id":"","url":"https://api.github.com/users/cormacrelf","html_url":"https://github.com/cormacrelf","followers_url":"https://api.github.com/users/cormacrelf/followers","following_url":"https://api.github.com/users/cormacrelf/following{/other_user}","gists_url":"https://api.github.com/users/cormacrelf/gists{/gist_id}","starred_url":"https://api.github.com/users/cormacrelf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cormacrelf/subscriptions","organizations_url":"https://api.github.com/users/cormacrelf/orgs","repos_url":"https://api.github.com/users/cormacrelf/repos","events_url":"https://api.github.com/users/cormacrelf/events{/privacy}","received_events_url":"https://api.github.com/users/cormacrelf/received_events","type":"User","site_admin":false},"repo":{"id":218973765,"node_id":"MDEwOlJlcG9zaXRvcnkyMTg5NzM3NjU=","name":"parking_lot","full_name":"cormacrelf/parking_lot","private":false,"owner":{"login":"cormacrelf","id":378760,"node_id":"MDQ6VXNlcjM3ODc2MA==","avatar_url":"https://avatars3.githubusercontent.com/u/378760?v=4","gravatar_id":"","url":"https://api.github.com/users/cormacrelf","html_url":"https://github.com/cormacrelf","followers_url":"https://api.github.com/users/cormacrelf/followers","following_url":"https://api.github.com/users/cormacrelf/following{/other_user}","gists_url":"https://api.github.com/users/cormacrelf/gists{/gist_id}","starred_url":"https://api.github.com/users/cormacrelf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cormacrelf/subscriptions","organizations_url":"https://api.github.com/users/cormacrelf/orgs","repos_url":"https://api.github.com/users/cormacrelf/repos","events_url":"https://api.github.com/users/cormacrelf/events{/privacy}","received_events_url":"https://api.github.com/users/cormacrelf/received_events","type":"User","site_admin":false},"html_url":"https://github.com/cormacrelf/parking_lot","description":"Compact and efficient synchronization primitives for Rust. Also provides an API for creating custom synchronization primitives.","fork":true,"url":"https://api.github.com/repos/cormacrelf/parking_lot","forks_url":"https://api.github.com/repos/cormacrelf/parking_lot/forks","keys_url":"https://api.github.com/repos/cormacrelf/parking_lot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cormacrelf/parking_lot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cormacrelf/parking_lot/teams","hooks_url":"https://api.github.com/repos/cormacrelf/parking_lot/hooks","issue_events_url":"https://api.github.com/repos/cormacrelf/parking_lot/issues/events{/number}","events_url":"https://api.github.com/repos/cormacrelf/parking_lot/events","assignees_url":"https://api.github.com/repos/cormacrelf/parking_lot/assignees{/user}","branches_url":"https://api.github.com/repos/cormacrelf/parking_lot/branches{/branch}","tags_url":"https://api.github.com/repos/cormacrelf/parking_lot/tags","blobs_url":"https://api.github.com/repos/cormacrelf/parking_lot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cormacrelf/parking_lot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cormacrelf/parking_lot/git/refs{/sha}","trees_url":"https://api.github.com/repos/cormacrelf/parking_lot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cormacrelf/parking_lot/statuses/{sha}","languages_url":"https://api.github.com/repos/cormacrelf/parking_lot/languages","stargazers_url":"https://api.github.com/repos/cormacrelf/parking_lot/stargazers","contributors_url":"https://api.github.com/repos/cormacrelf/parking_lot/contributors","subscribers_url":"https://api.github.com/repos/cormacrelf/parking_lot/subscribers","subscription_url":"https://api.github.com/repos/cormacrelf/parking_lot/subscription","commits_url":"https://api.github.com/repos/cormacrelf/parking_lot/commits{/sha}","git_commits_url":"https://api.github.com/repos/cormacrelf/parking_lot/git/commits{/sha}","comments_url":"https://api.github.com/repos/cormacrelf/parking_lot/comments{/number}","issue_comment_url":"https://api.github.com/repos/cormacrelf/parking_lot/issues/comments{/number}","contents_url":"https://api.github.com/repos/cormacrelf/parking_lot/contents/{+path}","compare_url":"https://api.github.com/repos/cormacrelf/parking_lot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cormacrelf/parking_lot/merges","archive_url":"https://api.github.com/repos/cormacrelf/parking_lot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cormacrelf/parking_lot/downloads","issues_url":"https://api.github.com/repos/cormacrelf/parking_lot/issues{/number}","pulls_url":"https://api.github.com/repos/cormacrelf/parking_lot/pulls{/number}","milestones_url":"https://api.github.com/repos/cormacrelf/parking_lot/milestones{/number}","notifications_url":"https://api.github.com/repos/cormacrelf/parking_lot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cormacrelf/parking_lot/labels{/name}","releases_url":"https://api.github.com/repos/cormacrelf/parking_lot/releases{/id}","deployments_url":"https://api.github.com/repos/cormacrelf/parking_lot/deployments","created_at":"2019-11-01T11:35:26Z","updated_at":"2019-11-01T11:35:27Z","pushed_at":"2019-11-01T11:58:47Z","git_url":"git://github.com/cormacrelf/parking_lot.git","ssh_url":"git@github.com:cormacrelf/parking_lot.git","clone_url":"https://github.com/cormacrelf/parking_lot.git","svn_url":"https://github.com/cormacrelf/parking_lot","homepage":null,"size":1502,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Amanieu:master","ref":"master","sha":"99e7e469396b53dd13d7e11fa7d0d9748cc9f08e","user":{"login":"Amanieu","id":278509,"node_id":"MDQ6VXNlcjI3ODUwOQ==","avatar_url":"https://avatars0.githubusercontent.com/u/278509?v=4","gravatar_id":"","url":"https://api.github.com/users/Amanieu","html_url":"https://github.com/Amanieu","followers_url":"https://api.github.com/users/Amanieu/followers","following_url":"https://api.github.com/users/Amanieu/following{/other_user}","gists_url":"https://api.github.com/users/Amanieu/gists{/gist_id}","starred_url":"https://api.github.com/users/Amanieu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Amanieu/subscriptions","organizations_url":"https://api.github.com/users/Amanieu/orgs","repos_url":"https://api.github.com/users/Amanieu/repos","events_url":"https://api.github.com/users/Amanieu/events{/privacy}","received_events_url":"https://api.github.com/users/Amanieu/received_events","type":"User","site_admin":false},"repo":{"id":58731560,"node_id":"MDEwOlJlcG9zaXRvcnk1ODczMTU2MA==","name":"parking_lot","full_name":"Amanieu/parking_lot","private":false,"owner":{"login":"Amanieu","id":278509,"node_id":"MDQ6VXNlcjI3ODUwOQ==","avatar_url":"https://avatars0.githubusercontent.com/u/278509?v=4","gravatar_id":"","url":"https://api.github.com/users/Amanieu","html_url":"https://github.com/Amanieu","followers_url":"https://api.github.com/users/Amanieu/followers","following_url":"https://api.github.com/users/Amanieu/following{/other_user}","gists_url":"https://api.github.com/users/Amanieu/gists{/gist_id}","starred_url":"https://api.github.com/users/Amanieu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Amanieu/subscriptions","organizations_url":"https://api.github.com/users/Amanieu/orgs","repos_url":"https://api.github.com/users/Amanieu/repos","events_url":"https://api.github.com/users/Amanieu/events{/privacy}","received_events_url":"https://api.github.com/users/Amanieu/received_events","type":"User","site_admin":false},"html_url":"https://github.com/Amanieu/parking_lot","description":"Compact and efficient synchronization primitives for Rust. Also provides an API for creating custom synchronization primitives.","fork":false,"url":"https://api.github.com/repos/Amanieu/parking_lot","forks_url":"https://api.github.com/repos/Amanieu/parking_lot/forks","keys_url":"https://api.github.com/repos/Amanieu/parking_lot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Amanieu/parking_lot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Amanieu/parking_lot/teams","hooks_url":"https://api.github.com/repos/Amanieu/parking_lot/hooks","issue_events_url":"https://api.github.com/repos/Amanieu/parking_lot/issues/events{/number}","events_url":"https://api.github.com/repos/Amanieu/parking_lot/events","assignees_url":"https://api.github.com/repos/Amanieu/parking_lot/assignees{/user}","branches_url":"https://api.github.com/repos/Amanieu/parking_lot/branches{/branch}","tags_url":"https://api.github.com/repos/Amanieu/parking_lot/tags","blobs_url":"https://api.github.com/repos/Amanieu/parking_lot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Amanieu/parking_lot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Amanieu/parking_lot/git/refs{/sha}","trees_url":"https://api.github.com/repos/Amanieu/parking_lot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Amanieu/parking_lot/statuses/{sha}","languages_url":"https://api.github.com/repos/Amanieu/parking_lot/languages","stargazers_url":"https://api.github.com/repos/Amanieu/parking_lot/stargazers","contributors_url":"https://api.github.com/repos/Amanieu/parking_lot/contributors","subscribers_url":"https://api.github.com/repos/Amanieu/parking_lot/subscribers","subscription_url":"https://api.github.com/repos/Amanieu/parking_lot/subscription","commits_url":"https://api.github.com/repos/Amanieu/parking_lot/commits{/sha}","git_commits_url":"https://api.github.com/repos/Amanieu/parking_lot/git/commits{/sha}","comments_url":"https://api.github.com/repos/Amanieu/parking_lot/comments{/number}","issue_comment_url":"https://api.github.com/repos/Amanieu/parking_lot/issues/comments{/number}","contents_url":"https://api.github.com/repos/Amanieu/parking_lot/contents/{+path}","compare_url":"https://api.github.com/repos/Amanieu/parking_lot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Amanieu/parking_lot/merges","archive_url":"https://api.github.com/repos/Amanieu/parking_lot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Amanieu/parking_lot/downloads","issues_url":"https://api.github.com/repos/Amanieu/parking_lot/issues{/number}","pulls_url":"https://api.github.com/repos/Amanieu/parking_lot/pulls{/number}","milestones_url":"https://api.github.com/repos/Amanieu/parking_lot/milestones{/number}","notifications_url":"https://api.github.com/repos/Amanieu/parking_lot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Amanieu/parking_lot/labels{/name}","releases_url":"https://api.github.com/repos/Amanieu/parking_lot/releases{/id}","deployments_url":"https://api.github.com/repos/Amanieu/parking_lot/deployments","created_at":"2016-05-13T10:59:24Z","updated_at":"2019-10-30T13:10:50Z","pushed_at":"2019-11-01T12:02:38Z","git_url":"git://github.com/Amanieu/parking_lot.git","ssh_url":"git@github.com:Amanieu/parking_lot.git","clone_url":"https://github.com/Amanieu/parking_lot.git","svn_url":"https://github.com/Amanieu/parking_lot","homepage":null,"size":1495,"stargazers_count":712,"watchers_count":712,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":59,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":13,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":59,"open_issues":13,"watchers":712,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Amanieu/parking_lot/pulls/187"},"html":{"href":"https://github.com/Amanieu/parking_lot/pull/187"},"issue":{"href":"https://api.github.com/repos/Amanieu/parking_lot/issues/187"},"comments":{"href":"https://api.github.com/repos/Amanieu/parking_lot/issues/187/comments"},"review_comments":{"href":"https://api.github.com/repos/Amanieu/parking_lot/pulls/187/comments"},"review_comment":{"href":"https://api.github.com/repos/Amanieu/parking_lot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Amanieu/parking_lot/pulls/187/commits"},"statuses":{"href":"https://api.github.com/repos/Amanieu/parking_lot/statuses/8fa2fd35fd8c74c7e959744b1ac47987cdd47f53"}},"author_association":"NONE"}}
{"actor":{"display_login":"bjorn3"}}