Skip to content
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

Using eventsloop only as source of events #420

Closed
Shookbelf opened this issue Mar 13, 2018 · 4 comments
Closed

Using eventsloop only as source of events #420

Shookbelf opened this issue Mar 13, 2018 · 4 comments
Labels
C - waiting on author Waiting for a response or another PR D - hard Likely harder than most tasks here DS - x11 F - question There's no such thing as a stupid one P - high Vital to have S - api Design and usability
Milestone

Comments

@Shookbelf
Copy link

Shookbelf commented Mar 13, 2018

Hey,

I want to use eventsloop only as a source of events for my actual main loop to receive. For this, I run it in another thread. Polling is not an acceptable solution.

Now I have the same problem as specified in #239: Window methods like get_inner_size() are blocking when the eventsloop is asleep. Could you clarify if this usage is supported? If it isn't, why would Window be Send + Sync?

@Shookbelf Shookbelf changed the title R Using eventsloop only as source for events Mar 13, 2018
@Shookbelf Shookbelf changed the title Using eventsloop only as source for events Using eventsloop only as source of events Mar 13, 2018
@francesca64 francesca64 added F - question There's no such thing as a stupid one DS - x11 S - api Design and usability C - waiting on author Waiting for a response or another PR D - hard Likely harder than most tasks here P - high Vital to have labels May 6, 2018
@francesca64 francesca64 added this to the EventsLoop 2.0 milestone May 6, 2018
@francesca64
Copy link
Member

Hey, sorry for the delay. I honestly have no idea whether or not that usage is "officially" supported, since those who came before me didn't document extensively. I will say that I encounter this problem in my own app, and that it's super annoying. It works fine on Windows (I'm not sure about on macOS, since deficiencies in glutin currently prevent sending a Window to another thread there).

I'll say two things:

  • Xlib's multi-threading support is notoriously shoddy, so I can't make any promises.
  • I'm waiting to try to fix this until during the backend rewrite that will be required by whatever consensus we ultimately reach in API Change Proposal: Events Loop 2.0 #459.

@Osspial
Copy link
Contributor

Osspial commented Apr 24, 2019

@vberger does #842 fix this?

@elinorbgr
Copy link
Contributor

I don't know enough about the x11 inner workings to answer that tbh.

@kchibisov
Copy link
Member

See #2900

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C - waiting on author Waiting for a response or another PR D - hard Likely harder than most tasks here DS - x11 F - question There's no such thing as a stupid one P - high Vital to have S - api Design and usability
Development

No branches or pull requests

6 participants