MCPcopy Create free account
hub / github.com/WayfireWM/wayfire / commit

Method commit

src/core/txn/transaction.cpp:48–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46}
47
48void wf::txn::transaction_t::commit()
49{
50 LOGC(TXN, "Committing transaction ", this, " with timeout ", this->timeout);
51 if (this->objects.empty())
52 {
53 // Empty transaction, directly ready.
54 apply(false);
55 return;
56 }
57
58 for (auto& obj : this->objects)
59 {
60 obj->connect(&on_object_ready);
61 obj->commit();
62 }
63
64 timer_setter(this->timeout, [=] ()
65 {
66 if (count_ready_objects < (int)this->objects.size())
67 {
68 apply(true);
69 }
70
71 return false;
72 });
73}
74
75void wf::txn::transaction_t::apply(bool did_timeout)
76{

Callers 1

do_commitMethod · 0.45

Calls 3

emptyMethod · 0.80
connectMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected