anchor.diff:  handle_fdb_result({0, RetVal}) -> {ok, RetVal};
   handle_fdb_result(0) -> ok;
   handle_fdb_result({error, network_already_running}) -> ok;
  +handle_fdb_result({Err = {error, _},_Future}) -> Err;
   handle_fdb_result(Other) -> Other.
   
   future(F) -> future_get(F, none).
   
   future_get(F, FQuery) -> 
  -  maybe_fdb_do([
  -    fun() -> wait_non_blocking(F, fdb_nif:fdb_future_is_ready(F)) end,
  +  maybe_do([
  +    fun() -> {fdb_nif:fdb_future_is_ready(F),F} end,
  +    fun(Ready) -> wait_non_blocking(Ready) end,
       fun() -> fdb_nif:fdb_future_get_error(F) end,
       fun() -> get_future_property(F, FQuery) end
     ]).
  
positive.code:   FullQuery = list_to_atom("fdb_future_get_" ++ atom_to_list(FQuery)),
    apply(fdb_nif, FullQuery, [F]).
  
  wait_non_blocking(F, false) ->
    Ref = make_ref(),
    maybe_fdb_do([
    fun ()-> fdb_nif:send_on_complete(F,self(),Ref),
      receive
        Ref -> {ok, F}
        after ?FUTURE_TIMEOUT -> {error, timeout}
      end
    end]);
  wait_non_blocking(F, true) ->
    {ok, F};
  wait_non_blocking(_, Error) ->
    Error.
  
  
negative.code: init_and_open() ->
    init(),
    api_version(100),
    maybe_do([
      fun() -> open() end,
      fun(DB) -> DB end
    ]).
  