[core-remote] Remove mutexes and other simplifications - #10074
Conversation
|
I think we might be able to eventually get rid of the |
…ire ids Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Indeed and I think reusing mutability of Registery to get &mut Encoder is actually first step towards this. Just throwing idea here so I do not forget: we make whole Hub mutable and then reuse hub mutablitity to get mutable Registery, for each usage we do |
Connections
Towards #10073
Description
First commit deals with always providing IDs, removing duality of IdentityManager by removing it for global (it only remains in IdentitiyHub which is ID generator/alloc that should live in content process, this type already exisited in servo https://github.com/servo/servo/blob/2b2dcbd1deefbd8011f0076e045f5f988f8e8141/components/script_webgpu/identityhub.rs and in firefox: https://searchfox.org/firefox-main/rev/ee8e457ae20efb27313476fed0bed50571c1199f/gfx/wgpu_bindings/src/client.rs#303)
All other commits deal with removing restriction of send/sync in global as browser impl do not need it and simplification this brings (discussed #9740 (comment)). We replaced all mutexes with RefCell 🎉. For encoders we reuse interior mutability of Registery to get &mut as outlined in #9740 (comment)
Testing
Just refactor
Squash or Rebase?
Rebase
Checklist
wgpumay be affected behaviorally.CHANGELOG.mdentries for the user-facing effects of this change are present.