Open jacobs100500 opened 7 years ago
We have some async/await support in the form of job messages, but this is mostly a developer nicety rather than any form of IO optimization.
Under the hood, we still use a distinct networking thread per client instance.
Is there a specific use case you have where thread-per-client is not scaling very well? I'm not entirely sure if we have any plans to support scaling up the number of clients SteamKit is capable of supporting at once, but it might be something we can investigate in the future.
I run a lot of bots (>100), then created at least 100 threads. All operations of read/write are blocking all this threads. Heartbeat function are blocks the thread every 5 seconds, without regard to other IO operations. Also, the callback manager when wait callback are blocking the main(!!!) thread. Because of this, my program is freezing or crashed on no respond. I rewrote the problem areas using async/await and the problem was solved. I can send the rewrited code.
I'd be interested in this - please 😊
Do you plan to add an async/await methods to work with the Steam network? When multiple accounts work is not very good to use synchronous methods. And the use of one thread (NetThread in the TcpConnection class) per account, consumes more resources than using async/await.