MCPcopy Create free account
hub / github.com/apache/mesos / promise

Function promise

src/log/consensus.cpp:800–828  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

798
799
800Future<PromiseResponse> promise(
801 size_t quorum,
802 const Shared<Network>& network,
803 uint64_t proposal,
804 const Option<uint64_t>& position)
805{
806 if (position.isNone()) {
807 ImplicitPromiseProcess* process =
808 new ImplicitPromiseProcess(
809 quorum,
810 network,
811 proposal);
812
813 Future<PromiseResponse> future = process->future();
814 spawn(process, true);
815 return future;
816 } else {
817 ExplicitPromiseProcess* process =
818 new ExplicitPromiseProcess(
819 quorum,
820 network,
821 proposal,
822 position.get());
823
824 Future<PromiseResponse> future = process->future();
825 spawn(process, true);
826 return future;
827 }
828}
829
830
831Future<WriteResponse> write(

Callers 5

callMethod · 0.85
selectFunction · 0.85
runPromisePhaseMethod · 0.85
runPromisePhaseMethod · 0.85
TEST_FFunction · 0.85

Calls 4

spawnFunction · 0.50
isNoneMethod · 0.45
futureMethod · 0.45
getMethod · 0.45

Tested by 1

TEST_FFunction · 0.68