Conversation
|
Making these handles un-Send would be a breaking change, so we might not want to do this. |
Yet, at least ;) |
| /// | ||
| /// [data attributes]: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/data-* | ||
| pub id: u32, | ||
| _marker: PhantomData<*const ()>, |
There was a problem hiding this comment.
I'm not sure what to think of this, the ID here is not a pointer, but it might be misleading for consumers who think that they are on the main thread if they got this variant.
Is there any previous discussion on this?
There was a problem hiding this comment.
I was also wondering if there are any plans to remove this type completely, now that we have the WebCanvasWindowHandle and WebOffscreenCanvasWindowHandle types.
There was a problem hiding this comment.
plans to remove this type completely
Moved to #157.
There was a problem hiding this comment.
I'm not sure what to think of this, the ID here is not a pointer, but it might be misleading for consumers who think that they are on the main thread if they got this variant.
Well, that's the same as what I've documented on e.g. AppKitWindowHandle, but I'm beginning to see that that may not be the best approach (hence why this PR isn't merged yet).
There was a problem hiding this comment.
After some more thinking I'm now in favor of making this !Send.
!Send and !Sync, and document main thread safety!Send and !Sync
Follow-up to #152 to consider documenting our decision on main thread safety, and making some handles
!Sendand!Sync.