-
Notifications
You must be signed in to change notification settings - Fork 634
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
beast migration path to coroutine2? #1055
Comments
Always glad to help when I can.
LOL...sorry for having a little chuckle at your expense. This setting only affects the stacks created by the compiler. It can't affect the stacks created by the coroutine library. When you spawn the coroutine you can adjust the stack size by passing in some additional settings. For example, this spawns a coroutine with 2MB of stack space:
Or you can adjust the settings used by Boost.PropertyTree, as illustrated in the answer here: Hope this helps! |
Wow how cool that we can fix it either via coroutine or ptree. The power/design of boost continues to amaze. |
Thanks so much again! |
I shamefully admit part of my reason for posting here is how quickly Vinnie responds to issues. This is most likely not a Beast problem but I'm hoping to tap his knowledge on co-routines.
I built a REST based server built upon the http_client_coro.cpp example which uses stackful coroutines. During one of our request handlers the app needs to reread an xml config file using boost::property_tree. In the read_xml_internal method we get a Access Violation exception. The top of the stack shows the function _chkstk() being called. Using VS2017 core guideline checker we get C6262 warning in the boost property tree that too much stack space is being used. We set the Linker->System->Stack Reserve Size to 4194304 but the crash still happens.
This call to reload the property tree does not fail if we call it outside of the lambda that gets invoked by the REST server.
No large arrays are being used.
Would coro2 or stackless coroutines be a solution?
Any thoughts?
The text was updated successfully, but these errors were encountered: