-
Notifications
You must be signed in to change notification settings - Fork 948
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove Sync
bound from EventsLoop
- Add a proxy type as the exclusive way of interrupt
ing the loop from other threads.
#187
Comments
What is the purpose of the |
The
As an example, I tend to run my GUI on a separate thread in order to free up main for rendering. When my GUI is ready to draw (as the result of some update), I use a channel to send the batch of graphics primitives from the GUI thread to the main thread. Normally my |
In your use case, it sounds like you use both the In Alacritty, there are two threads: the The
In that case, pushing a wakeup event on the queue is wasteful, which was the point of the proposal in #175 to separate them. Under this system, your GUI thread would call |
Ah yes, reading over this and over #175 again I can see how it could be useful to divide up this behaviour (even though I personally haven't come across the need yet). As I understand it, the two behaviours would be split up like this:
Does this sound correct? If so I think I'd be happy with this change 👍
I agree this would be nice, however I don't think this is possible due to the use of |
Yes! 😄
Oh, right. At the point we can't simply use |
This commit only updates the top-level API to get some early feedback. None of the platform-specific code has been updated yet. I'm hoping to get around to this over the next couple days however if someone more familiar with the windows backend would like to do a PR against this fork that would be a great help. Closes rust-windowing#187.
Should I'm leaning towards the |
This commit only updates the top-level API to get some early feedback. None of the platform-specific code has been updated yet. I'm hoping to get around to this over the next couple days however if someone more familiar with the windows backend would like to do a PR against this fork that would be a great help. Closes rust-windowing#187.
Previously with In addition to it being helpful for winit consumers, the underlying APIs expect in some cases to have the event directed at a particular window. For X11, it's required to provide the window id to send the interrupt event. The API I was toying with locally for fn wakeup(&self, window: WindowId); Maybe the case is much different for other backends, though? |
This is a follow up to the discussion in #136 and for tracking the change discussed here. Related to #175 cc @jwilm.
The text was updated successfully, but these errors were encountered: