microsoft / microsoft/CCF

Improve lifetime management around the uv loop

Open
#7,454 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
876
Forks
260
Avg merge
1d 11h
Merged PRs (30d)
157

Description

We have several raw pointers in our tcp handlers (and IO threads) which use the uv loop to manage their lifetime (eg `uv_getaddrinfo_t`).

A better approach would be to have these objects within shared pointers in some higher level collection.
This will also make clang-tidy happier.

Contributor guide

Open the contributing guide

Research direction

Start by locating the TCP handlers, IO-thread code, and uses of uv_getaddrinfo_t that rely on the uv loop for lifetime management. Map the current raw-pointer ownership before evaluating a higher-level shared-pointer collection; done means the relevant objects use the proposed ownership approach and clang-tidy no longer reports the lifetime issues.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
networking
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.