type waiter =
{ w_wait : unit Lwt.t;
w_waker: unit Lwt.u option;
mutable w_did_wait : bool }
I don’t understand why there are “unit” in w_wait and w_waker?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
According to Lwt’s doc the type
'a Lwt.tis the “type of threads returning a result of type ‘a.“, so yourw_waitis a cooperative thread returning unit (i.e. having only side effects). Likewise'a Lwt.uis the “type of thread wakeners“.I don’t understand what you don’t understand in Lwt documentation. It seems quite understandable to me.