Move webgl_channel into base crate#32339
Conversation
mrobinson
left a comment
There was a problem hiding this comment.
This is a nice start. This generic sender seems like a very basic type, unlikely to change and widely useful. Can you move this to components/base/generic_channel.rs instead of making a new crate? process is a bit odd, because crossbeam channels don't have anything to do with processes.
In addition, please use this new data structure to replace OpaqueSender in components/shared/profile/mem.rs.
Thanks!
|
@mrobinson I couldn't move it to |
Please move |
Ah I think I can add a parameter to check instead. So we can still have a create channel function in this module.
Do you mean type alias |
Since |
After looking into it further, I found there are more types passed in profile's |
WebGL channels are interesting because they can select different channel implementations in runtime based on multiprocess or not.
There's a Zulip discussion around multiprocess, and I feel like this is a potential improvement if other places using
ipc::channelcould also use this.I named this crate
processbecause I hope it will also add other types related to processes and threads in the future, such as moving net's async runtime to here. So we have better control over how they spawn and communicate. Any name suggestion is welcome../mach build -ddoes not report any errors./mach test-tidydoes not report any errors