chriskohlhoff / asio

Asio C++ Library
http://think-async.com/Asio
4.73k stars 1.2k forks source link

Supporting custom thread/chrono implementations #1321

Open jwt27 opened 1 year ago

jwt27 commented 1 year ago

Hi!

I'm looking to use asio on a platform with no native thread support. With some small changes, I got it to compile with ASIO_DISABLE_THREADS, and intend to send a PR soon.

I do however have my own implementations of std::thread, std::mutex, etc. Likewise the clocks in std::chrono are very slow and have very poor resolution, so I have my own implementations for those too. But of course, they are not in namespace std.

Now, I could just fork the repo and hard-code my own types in there. But I figure it would be much nicer if those types could be customized via macros. Of course, this is all rather specific to my situation - I don't know if anyone else would ever need it.

I'd like to start working on a patch to implement this. But before I do, I would like to know: will there be any chance of getting it merged?