ECP-VeloC / AXL

Asynchronous Transfer Library
MIT License
2 stars 8 forks source link

Add async daemon #12

Closed adammoody closed 6 years ago

adammoody commented 6 years ago

This pulls over the async transfer process from SCR, which is forked/exec'd by the library. This works, although it requires that the path to the axl transfer process is in $PATH to work. The automated test fails right now, so I've disabled it by default. In a later PR, I'll fix this or convert it to a pthread solution, or both.

This also adds some logic for AXL_Cancel and AXL_Free, which was needed for cleanup of an async transfer process where the client was interrupted before it completed.

This PR modifies the AXL API in a few ways:

adammoody commented 6 years ago

Ready for review on this one.

adammoody commented 6 years ago

Thanks, @gonsie. All of these changes look good to me. I can do these later today or tomorrow.

adammoody commented 6 years ago

Thanks for the changes, @gonsie.

I'm realizing that we can't fully drop the err functions, because the AXL_ERR macros still use the functions -- they just add some parameters. We still need to copy in the function bodies to fully replace them.

adammoody commented 6 years ago

@gonsie, I added the axl_err() and axl_dbg() functions back. The rest of our code should invoke these functions via the macro, but the functions are currently still needed for compiling since the logic was not in the macro. We could move that logic fully into the macro, but I find it to be useful to have a real function for handling errors, since it's easy to drop breakpoints in there from a debugger whereas debuggers don't handle macros well.

To fix this up, I just dropped that last commit and then did a force push. That's probably not the cleanest way to do that, and if that's a giant headache, we can bring that commit back and add a another commit that reverses it.

Anyway, let me know where we stand on merging this PR.

adammoody commented 6 years ago

Another good summer intern project would be to add a pthread version of axld. The separate process as implemented here works, but it's clumsy. A pthread version would be a lot cleaner.

gonsie commented 6 years ago

Thanks for the heads up about the force push, that is fine with me.

I am trying to use the GitHub interface to mark my review comments as outdated (when a code change on that line has happened) or resolved (when we've discussed them and no change is needed). I still see 6 comments as unresolved. You should be able to reply in-line to my comments if you don't agree or don't think the comment will be resolved by a commit.

adammoody commented 6 years ago

Ah, I see. That's nifty. I'll work on those other comments.

adammoody commented 6 years ago

I may have missed something. Please let me know if that's the case.