iilyak commented on PR #5576:
URL: https://github.com/apache/couchdb/pull/5576#issuecomment-2997490533

   > Handling flag doesn't land naturally into maybe pattern.
   
   Also handling error cases would be tricky if flag aware implementation is 
attempted in the 
   `handle_call({write_header, Bin, Options}, _From, #file{fd = Fd, eof = Pos} 
= File) ->` clause. Since in this case I would need to distinguish error from 
sync (where I need to stop the gen_server) from errors from `file:write`. The 
problem is that both errors has same form `{error, Reason}`. So I have to split 
out the helper function anyway.
   
   I'll keep thinking about how to implement `sync` flag. However so far it 
seem more complex than version with dedicated function.
    
   


-- 
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]

Reply via email to