MCPcopy Create free account
hub / github.com/apple/foundationdb / createFromExistingDatabase

Method createFromExistingDatabase

fdbclient/ThreadSafeTransaction.cpp:44–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42}
43
44ThreadFuture<Reference<IDatabase>> ThreadSafeDatabase::createFromExistingDatabase(Database db) {
45 return onMainThread([db]() {
46 db->checkDeferredError();
47 DatabaseContext* cx = db.getPtr();
48 cx->addref();
49 return Future<Reference<IDatabase>>(Reference<IDatabase>(new ThreadSafeDatabase(cx)));
50 });
51}
52
53Reference<ITenant> ThreadSafeDatabase::openTenant(TenantNameRef tenantName) {
54 return makeReference<ThreadSafeTenant>(Reference<ThreadSafeDatabase>::addRef(this), tenantName);

Callers

nothing calls this directly

Calls 4

onMainThreadFunction · 0.50
checkDeferredErrorMethod · 0.45
getPtrMethod · 0.45
addrefMethod · 0.45

Tested by

no test coverage detected