Update comments

This commit is contained in:
Neil Alexander 2021-06-29 14:38:59 +01:00
parent 7c9f6b5872
commit f91b01f817
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -130,9 +130,9 @@ func (r *Inputer) InputRoomEvents(
request *api.InputRoomEventsRequest, request *api.InputRoomEventsRequest,
response *api.InputRoomEventsResponse, response *api.InputRoomEventsResponse,
) { ) {
// Create a wait group. Each task that we dispatch will call Done on // Each of the requests will return to us on the wait channel.
// this wait group so that we know when all of our events have been // We can also close the wait channel early if the request context
// processed. // comes to an end, so that we don't leak goroutines.
ctx, cancel := context.WithCancel(ctx) ctx, cancel := context.WithCancel(ctx)
defer cancel() defer cancel()
count := len(request.InputRoomEvents) count := len(request.InputRoomEvents)