Skip to content

Ozerova#167

Open
OzerovaKs wants to merge 4 commits into
mainfrom
Ozerova
Open

Ozerova#167
OzerovaKs wants to merge 4 commits into
mainfrom
Ozerova

Conversation

@OzerovaKs
Copy link
Copy Markdown
Collaborator

No description provided.

Copy link
Copy Markdown
Owner

@IlyaOrlov IlyaOrlov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Решение вызвало ряд вопросов.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Почему для решения задачи выбраны именно потоки?
Что если нам потребуется складывать не пары аргументов, а сразу много?
Почему для потоков есть start, но отсутствует join?

Copy link
Copy Markdown
Owner

@IlyaOrlov IlyaOrlov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Добавил небольшое замечание. Ну и старые вопросы остались.

self.age = age

def receive_user_info():
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Этот сокет надо закрыть. Самый правильный способ это сделать - использовать менеджер контекста:

with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
    ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants