Add comment documenting confusing list_to_streams code.

This commit is contained in:
Tim Abbott 2016-06-21 11:45:35 -07:00
parent fc8d4f9ef5
commit 80d92c1651
1 changed files with 3 additions and 0 deletions

View File

@ -84,6 +84,9 @@ def list_to_streams(streams_raw, user_profile, autocreate=False, invite_only=Fal
if created:
created_streams.append(stream)
else:
# We already checked for existing streams above; this
# next line is present to handle races where a stream
# was created while this function was executing.
existing_streams.append(stream)
return existing_streams, created_streams