You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using std::shared_ptr for each packaged_task adds unnecessary overhead. Each task submission creates a heap allocation for the shared_ptr and its control block. The lambda capture of the shared_ptr by value in write_task is necessary to keep the task alive, but this design could impact performance for high-frequency task submissions. Consider whether the shared_ptr is truly necessary or if there's a more efficient ownership model.
Activity