Thank you very much for your time and efforts.
It helped me to understand something but for each explanation I got 10 new
questions :)

Just the first one.

*>> open_async(Server, From, DbName, Filepath, Options) ->
>>    Parent = self(),
>>
>First, store the current process ID so it can be accessed later on, from a
>closure running in another process.*

There is only one couch_server process. It is created like this:
gen_server:start_link({local, couch_server}, couch_server, [], []).

As far as I understand it means that there is no need to remember the
process ID (Parent), and instead of
gen_server:call(
                Parent, {open_result, DbName, Res, Options}, infinity
            ),

we can use

gen_server:call(
                couch_server, {open_result, DbName, Res, Options}, infinity
            ),

I have many more but to avoid misunderstanding I would propose to stop here.
I will try to dig further myself.
When I have specific questions I will try to approach this list.

Thank you !

-
Andrey

Reply via email to