-
Notifications
You must be signed in to change notification settings - Fork 607
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
Run & stop workers #2860
Run & stop workers #2860
Conversation
⚪
|
⚪
|
@@ -213,7 +215,7 @@ void TController::CreateSession(ui32 nodeId, const TActorContext& ctx) { | |||
<< ": nodeId# " << nodeId); | |||
|
|||
Y_ABORT_UNLESS(!Sessions.contains(nodeId)); | |||
Sessions.emplace(nodeId, TSessionInfo{}); | |||
Sessions.emplace(nodeId, TSessionInfo()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you are calling default constructor, maybe better just Sessions.emplace(nodeId). And instead of contains + emplace, you could use result of emplace to check either you emplaced new value or it was already there.
Changelog entry
...
Changelog category
Additional information
...