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

Make Qt + asyncio + UDP work on Windows #39

Closed
sbourdeauducq opened this issue Jun 21, 2015 · 12 comments
Closed

Make Qt + asyncio + UDP work on Windows #39

sbourdeauducq opened this issue Jun 21, 2015 · 12 comments
Assignees

Comments

@sbourdeauducq
Copy link
Member

The GUI needs UDP to talk to the core device in the TTL and DDS panels. On Windows, the quamash event loop is based on ProactorEventLoop which does not support UDP.

@jordens
Copy link
Member

jordens commented Aug 22, 2015

I had a look at how this could be done a while ago. Doing this the "right" way, that is within tulip/asyncio is close to impossible. The common denominator event loop for qt/quamash/tulip is the Proactor/IOCP stuff.

That said: The "inj" part should be work-around-able. The name lookup can be done asyncio-style and then sending udp through a regular socket is non-blocking. The "mon" part is a bit harder. Delegating moninj to a slave process/thread that translates udp to stdout/stdin might be ok.

@sbourdeauducq
Copy link
Member Author

Did you have a look at how exactly Microsoft (or whoever is responsible) messed up IOCP/proactor enough for UDP to be that difficult?

@jordens
Copy link
Member

jordens commented Aug 22, 2015

IOCP-UDP seems to have zero users in general. The best pointers that I have are that one would have to marry something like this: http://members.gamedev.net/edxLabs/network/WHSPSUSUIOCP.zip with this: https://github.com/python/asyncio/blob/master/overlapped.c

@sbourdeauducq
Copy link
Member Author

84b0760 disables moninj on windows so the GUI should at least start.

@sbourdeauducq
Copy link
Member Author

If we use UDP for logging, we're going to need that as well in the master and the controller manager. They also need to use ProactorEventLoop due to their use of subprocesses.

@sbourdeauducq
Copy link
Member Author

There is an existing issue in the Python tracker:
https://bugs.python.org/issue23295

@sbourdeauducq
Copy link
Member Author

@jordens Who wants this in 1.0?

@sbourdeauducq
Copy link
Member Author

This will require a Python patch, which from past experience with multibind takes 10 months to merge + make it to anaconda.

@sbourdeauducq sbourdeauducq removed this from the 1.0 milestone Jan 26, 2016
@whitequark
Copy link
Contributor

@sbourdeauducq You are OK with shipping modified Qt, but not modified Python? Python is way easier to build and distribute.

@sbourdeauducq
Copy link
Member Author

I don't like either, but the Qt bugs consistently produced ugly display artifacts whereas this Python issue only reduces the features available on Windows. The Qt bugfixes should go directly upstream, we have the workarounds in place in the meantime.

@jordens
Copy link
Member

jordens commented Jan 26, 2016

@sbourdeauducq I put this into the 1.0 milestone because this is severely limiting the usability of the GUI on windows. The latter would be something we want for 1.0.

@sbourdeauducq
Copy link
Member Author

Done with threads. Slightly hacky, but we should end up rewriting this with TCP at some point anyway.

hartytp referenced this issue in hartytp/artiq Jun 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants