Skip to content

Documentation is not clear if boost::asio::spawn can be used with multiple threads #18

@johnwason

Description

@johnwason

I have been testing out boost::asio::spawn that results in a boost::asio::yield_context and it appears that if I have more than one thread in the thread pool for io_service it will eventually result in an access violation. This is being caused by io_service resuming the coroutine from a different thread. From what I have read this is correct behavior, however the documentation on spawn and yield_context do not mention the thread safety problem. It would be very helpful if the documentation discussed this issue in more detail to prevent this misunderstanding.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions