-
Notifications
You must be signed in to change notification settings - Fork 183
Subclassing lwt engine doesn't really work. #237
Copy link
Copy link
Open
Milestone
Description
I recently worked on the ordma package and needed to implement a new Lwt engine, based on librdmacm's rselect. There were some problems:
- Lwt checks for readability (
Lwt_unix.readable) on aLwt.file_descron the side using a separate call to poll here, iso going through the engine. This breaks down if the resource represented by thisLwt.file_descris not a resource that can bepoll-ed (in this case an rsocket). Lwt.file.descrhas some internal state (the state attribute )that cannot be manipulated through the interface. This forced me into using a private copy the definition, and a "cast" viaObj.magic,
which is really ugly. A typical example is the close call.
Basically, what I'm saying is that there is an API to plug in your own lwt engine, but that it doesn't really work when you actually try to do this (or I wasn't smart enough to figure out how to do this cleanly).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels