Updated the file to use Lwt_stream.t in place of using Lwt_async+Lwt_mvar.t#10
Updated the file to use Lwt_stream.t in place of using Lwt_async+Lwt_mvar.t#10prernadabi23 wants to merge 4 commits intorand00:mainfrom
Conversation
rand00
left a comment
There was a problem hiding this comment.
You are closer to the solution than before, but a bunch of more changes are required. Try to see how much you can solve from my comments and from the compiler complaining.
| .. (will be okay if not ordered, as Ring reorders) | ||
| *) | ||
| Lwt.async (fun () -> Lwt_mvar.put flow.sink ring_field); | ||
| Lwt_stream.push flow.sink ring_field; |
There was a problem hiding this comment.
There is no such function. This is why I've said that the type alias type 'a stream = 'a Lwt_stream.t * ('a option -> unit) on line 164 is the type needed for the sink field.
| ) | ||
| end; | ||
| Lwt_mvar.take flow.sink >>= fun ring_field -> | ||
| Lwt_stream.get_available flow.sink >>= fun ring_field -> |
There was a problem hiding this comment.
This function returns an 'a list and not a 'a Lwt.t which is what I would use here. This is also what is needed to use the bind operator >>=. See if you can find the correct function to use here
| type partial_flow = { | ||
| is_client : bool; | ||
| sink : ring_field Lwt_mvar.t; | ||
| sink : ring_field Lwt_stream.t; |
There was a problem hiding this comment.
See my later comment concerning push, you are almost using the correct type, but not quite.
😭 Thank you..!! |
|
Hello @rand00, I will be a little late as I have exams this month, but I am working on it whenever I am free. |
Updated the file to use Lwt_stream.t in place of using Lwt_async+Lwt_mvar.t
fixes: #4
Signed-off-by: Prerna Dabi prernadabi24@gmail.com
@rand00