-
Notifications
You must be signed in to change notification settings - Fork 468
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
Add support for Linux #15
Comments
cppcoro is now at least buildable under Linux/Clang on the Still outstanding is the need to work on an implementation of |
For async file I/O for For async socket I/O it seems like epoll is the go. Need to investigate how to mix the two approaches (aio/epoll) in the same event loop. |
So, did you guys start working on this? |
I haven't started on Linux async I/O support yet. |
I will work on it. But before I start can you help me compile the current code on linux? The build instructions aren't working for me. |
Sure. Can you create a new issue to work through the build issue? |
scheduler_operator_tests.cpp and io_service_tests.cpp are now working in linux. I will get file tests working as well and send a PR. I am using linux message queues as a sub for iocp, timerfd/eventfd for WaitableTimer/AutoresetEvent, and epoll for WaitForMultipleObjects. For files, I plan to send messages to the message queue from AIO's signal handling functions. |
Great! I look forward to the PR :) For AIO, can you use an eventfd as the Or are you talking about something different? |
That's right! I will try the resfd way. I remember a while ago that it wasn't stable. Its been long. They should've worked it out by now... |
@neo5167 How are you going with the epoll/aio |
Was on vacation. How about I send a PR for everything without files and then send the files one once its done. WIN32 APIs are more prevalent in the files code than in timer/scheduler code, so taking longer than I expected... |
Have you seen AFIO already? https://ned14.github.io/afio/ |
I intend to propose AFIO as the File I/O TS in the June WG21 meeting. AFIO is the complete redesign after a Boost peer review in 2013, and therefore ought to carry some weight with regards to design with WG21 (but we shall see!). As you'll notice in AFIO, we don't prioritise async file i/o in the design, mainly because it isn't faster for most use cases, is definitely not faster on SSDs and is positively retrograde on SCM. I suspect you'll thus want to stick with your implementation. But keep at your library, looks valuable and I'd encourage you to submit it to Boost soon. We sorely need abstractions built on top of Coroutines both for Boost, and thence the C++ library. |
@neo5167 A PR with the basic @tavi-cacina Thanks for pointing AFIO out. I had heard of it but haven't had a chance to look into it in any depth yet. I'll check it out. @ned14 Thanks for the encouragement :) There's still a lot I want to add to it and a few things I want to revisit before I feel it will be baked enough for submitting to Boost. |
Great. Some info on timeline: |
Good to go on my end. Can I have write perms to create a branch to push my changes to? I can generate a PR after that. |
@lewissbaker ping. :) |
@neo5167 The typical GitHub work flow is to create a fork of the repo, make your branch there, and make a pull request from there back to the original repo. |
Got it. |
@neo5167 My apologies for the delay in getting back to you. I've been travelling this week. As @ericniebler suggested, it's probably best if you create your own fork of cppcoro and push your changes to a branch of that fork and then create a PR to merge those changes back into this repository. I'm looking forward to seeing the PR, I think a lot of people are hanging out for it! |
@lewissbaker I created the PR. |
@neo5167 Great, I'll check it out. |
@lewissbaker Got a chance to try it out? I have a fixed few things. Will send another commit into the PR soon. |
@neo5167 I have started reviewing the code and am about 50% through. |
@lewissbaker @neo5167 thanks for the library and the port for Linux! I grabbed a copy it and used it in the prototype application I am playing with. One issue I noticed is that the POSIX message queue based message_queue is pretty slow, it became a bottleneck when I need to do lots of io_service.schedule()/resume_on(). I plugged in Cameron Desrochers's lock free queue with built-in block queue wrapper, it solved my problem. I guess this might be useful. Thanks. |
@lni Thanks for the input. I will take a look at that and see how we can use that. |
@lewissbaker Is it possible to get a private email address to chat with you? I wanted to go over somethings but prefer doing it in a private setting. Thanks! |
@neo5167 Sure, no worries. My email is my github username at gmail dot com. |
The linux scheduler and timer support code (beta) is at the following fork if anyone wants to try: |
Hows linux support as of today? |
I did implement the linux support for an older version that is here: |
There any important upstream changes in cppcoro branches that I'd be missing out on? It work? ;) |
oh btw one thing I noticed with your repo @neo5167 is the definition of the linux inner namespace conflicts with some other projects pre-processor definition of linux=1. |
Alright cool @neo5167 got it building with vcpkg, will report back if I find anything, here's the port file info if anyone is needing it: https://bitbucket.org/aparavi/vcpkg/src/aparavi/ports/cppcoro/ |
Hi there! Am I right to see, that the work on the Linux support is suspended right now (last comment on December 21st)? Any chance I can offer my help? |
Hi there ! Tell me what you think about it. |
All tests passing !
And my cppcoto-http extension works pretty well :) |
Add cmake support
While most of cppcoro is platform agnostic, some of the thread-pooling and I/O code is OS-specific.
This issue is for providing an implemention of the cppcoro I/O abstractions for Linux.
Will need to get it building under Clang as a first step. See #3.
Then:
The text was updated successfully, but these errors were encountered: