nickva commented on a change in pull request #3940:
URL: https://github.com/apache/couchdb/pull/3940#discussion_r814307503
##########
File path: src/couch/src/couch_httpd_multipart.erl
##########
@@ -104,6 +104,10 @@ mp_parse_atts(eof, {Ref, Chunks, Offset, Counters,
Waiting}) ->
receive
abort_parsing ->
ok;
+ {hello_from_writer, Ref, WriterPid} ->
+ WriterRef = erlang:monitor(process, WriterPid),
+ NewCounters = orddict:store(WriterPid, {WriterRef, 0},
Counters),
+ mp_parse_atts(eof, {Ref, Chunks, Offset, NewCounters,
Waiting});
Review comment:
It's only 2 lines but noticed it repeats 3 times, wonder if it would
look simpler with a tiny helper function like `{WRef, NewCounters} =
writer_init(WriterPid, Counters)`. But then again, it's smaller enough so it
doesn't look a lot better, maybe not worth bothering.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]