X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=HACKING;h=0a27b77fc5df3856e818f2c33e145d56f5a9c6c1;hb=73f1dc10b4279528818fe0fda33daf4c34488d21;hp=7a139bcdf1cf2d15088654f171966a1a8bdf491b;hpb=bbfe03c47f1d7f03c3e6c0cab9e4f500f588c80a;p=guestfs-browser.git diff --git a/HACKING b/HACKING index 7a139bc..0a27b77 100644 --- a/HACKING +++ b/HACKING @@ -22,6 +22,9 @@ In OCaml, a module such as 'Slave' is defined by its interface in 'slave.mli' (note lowercase first letter), and its implementation in 'slave.ml'. +In general terms, always start by reading the .mli file (if it exists) +in order to understand the module and before opening the .ml file. + Threads and messages -------------------- @@ -48,9 +51,9 @@ safe, and in any case we don't want the main thread to block because it performs some long-running operation by accident). The slave thread is defined in the Slave module (interface: -'slave.mli') and all slave_* files. The Slave module also defines -what commands are possible. Every other module and file is part of -the main thread except for a few utility / library modules. +'slave.mli') and the slave.ml implementation. The Slave module also +defines what commands are possible. Every other module and file is +part of the main thread except for a few utility modules. The main thread starts in the module Main. @@ -61,7 +64,7 @@ Most modules alias short names for some common libvirt and libguestfs modules, eg: module C = Libvirt.Connect - module G = Guestfs + module Q = Queue So when you see a function such as 'C.connect_readonly', it's really the function 'connect_readonly' in the [nested] module