[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[MirageOS-devel] PR refactoring CHANNEL to be exceptionless


  • To: mirageos-devel <mirageos-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Anil Madhavapeddy <anil@xxxxxxxxxx>
  • Date: Thu, 24 Nov 2016 11:22:08 +0000
  • Delivery-date: Thu, 24 Nov 2016 11:22:26 +0000
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=recoil.org; h=from :content-type:content-transfer-encoding:subject:message-id:date :to:mime-version; q=dns; s=selector1; b=cXRwK73PzlkMcRsjvlK4WZ60 1/gHe7diJ9pCuZLYcAaUULBKham6f5y3+HY7hSN/a/FFEttySMAxdmp8r80CiR8f LvpRoGnAL7dpNKNtO3yMkKQg4nljGQHm4dF4M0/9ma1Ye/EYrBCPT1IIuuUnAZqv /Zpqgl9Vflq5a+L1ybE=
  • List-id: Developer list for MirageOS <mirageos-devel.lists.xenproject.org>

I've been continuing the exception purging from the MirageOS3 APIs.  Since FLOW 
now returns `result` types that are compatible with rresult, I also moved 
CHANNEL to the same style:

https://github.com/mirage/mirage/pull/702

I also took the opportunity to narrow the CHANNEL interface by removing some 
functions.  Most of the consumers purely use it as a BufferedFlow, and so the 
(very barebones) line reading functions should also be moved out.  So I:

- use result types everywhere and not expose any exceptions
- removed read_stream and io_stream, since Lwt_streams are very difficult to 
combine with effective error handling. I could find no consumers of this 
interface in the modern libraries.
- removed read_until as it is only used internally by read_line
- read_line is itself only used by Cohttp, which will be migrating towards an 
Angstrom-based parser via Spiros' work on af.  So I am considering introducing 
a new BufferedFlow interface that eliminates read/write_line as well, but that 
is not in this PR.

Quick review welcome on the PR, as I would like to merge this and the dependent 
PRs soon to get the trees all building again before Thanksgiving finishes and 
our release manager returns :)

Anil
_______________________________________________
MirageOS-devel mailing list
MirageOS-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.