forked from wesnoth/wesnoth
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use coroutines via boost::asio::spawn to improve overall code structu…
…re in servers (wesnoth#5341) * Convert server_base class to use coroutine instead of handlers * Rework wesnothd's client login to use coroutine * Merge 3 player handling functions into a single coroutine * update cmakelists too * Implement send_doc_queued in terms of coroutine * Use brace initialization for making asio buffers * Implement campaignd's request handling in coroutine * Brace-initialize entire vector * Remove old handler based send/receive helpers * Document coroutine send/receive helpers * Made coro_send_doc() helper take wml doc by reference In most cases there is no need to rely on shared pointers to ensure object lifetime if using coroutines since even when coroutine is suspended args are still kept alive by its context. * Document coro_send_file() * Silence deprecation warning to fix build on earlier versions of boost * Explicitly check for boost.context to allow linking against static boost libs * Add boost.coroutine to flatpak manifest * Port winapi TransmitFile codepath to coroutines * Exception safety fix * Add boost.scope_exit to vcpkg * Fix build with pre-1.66 boost * Move coro_* helpers into server_base class Those helpers were in .ipp solely because they were templated on handler types, this is no longer true after coroutine based rework. * Make server_base::coro_send_file non-inline * CleanUp Xcode project Co-authored-by: Martin Hrubý (hrubymar10) <[email protected]>
- Loading branch information
1 parent
204357c
commit 3933eba
Showing
16 changed files
with
563 additions
and
724 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.