ygrek / ocaml-mysql

OCaml bindings to libmysqlclient
https://ygrek.org.ua/p/ocaml-mysql
GNU Lesser General Public License v2.1
23 stars 11 forks source link

Document blocking functions #6

Open darioteixeira opened 8 years ago

darioteixeira commented 8 years ago

I'm taking a look at ocaml-mysql for interfacing with Google Cloud SQL. Since the application uses Lwt, I'm using Lwt_preemptive.detach to get around ocaml-mysql offering only a blocking API. There is one major hurdle with this approach, however: it's not always obvious which functions block on I/O and which ones don't. It would be nice if the API documentation for ocaml-mysql were explicit on this matter.

ygrek commented 7 years ago

I think this is better left of for the libmysqlclient documentation, to avoid duplication. For example some libmysqlclient internals might change and the function that was interacting with server may stop doing so or vice versa, do we really want to track all such cases?

ygrek commented 7 years ago

FWIW, my argument above doesn't look convincing to me now. But I am unlikely to work on this myself. Feel free to provide patch or close..