Skip to content

Update 'executor' references to use std::shared_ptr<executor_type> #85

@jbaldwin

Description

@jbaldwin

Currently a good portion of the lifetimes around types that take a reference to an executor type (like thread_pool or io_scheduler) do so by reference. Its generally assumed the executor will outlive all of its 'child' like task types that are driven by it, but this is not guaranteed. The general cost of moving to a shared ptr should be cheap enough to make sure the lifetime issues do not occur?

I think prototyping it out and the benchmarking would be an appropriate approach, short lived tcp_client's could possibly impose a penalty but its probably worth it safety wise.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions