> On Jan. 30, 2014, 7:41 p.m., Ben Mahler wrote: > > 3rdparty/libprocess/src/tests/sequence_tests.cpp, lines 61-62 > > <https://reviews.apache.org/r/17476/diff/3/?file=456680#file456680line61> > > > > I'm a little confused with the expected use case, why would someone not > > just use .onAny or .then? > > > > In this example they have the foresight to now that they want bar > > called after foo, which means a .then or .onAny would be equivalent? > > > > Is Sequence meant to be kept around, and have things added to it in > > multiple contexts?
Ben, see the Sequence.Random test. Sometimes, users may want atomicity but do not care about the order. Think about a Sequence object as a mutex in the thread-based world. We need that in the new LogStorage for State: https://reviews.apache.org/r/17423/ - Jie ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/17476/#review33239 ----------------------------------------------------------- On Jan. 30, 2014, 6:06 p.m., Jie Yu wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/17476/ > ----------------------------------------------------------- > > (Updated Jan. 30, 2014, 6:06 p.m.) > > > Review request for mesos and Benjamin Hindman. > > > Repository: mesos-git > > > Description > ------- > > See summary. > > One think I haven't done yet is to make it accepts '_Defer' types. (Just > curious why Future.onAny can accept defer without doing something special). > > Also, we can get rid of the SequencerProcess if we use a mutex to protect > 'last'. Not sure which one is better. > > The discard semantics here is a bit tricky. Basically, I wanna support > discarding a single callback without affecting other callbacks. Also, when > the Sequencer object is deleted, I wanna discard all the pending callbacks. > > > Diffs > ----- > > 3rdparty/libprocess/Makefile.am bbd17cc > 3rdparty/libprocess/include/process/sequence.hpp PRE-CREATION > 3rdparty/libprocess/src/tests/sequence_tests.cpp PRE-CREATION > > Diff: https://reviews.apache.org/r/17476/diff/ > > > Testing > ------- > > make check > > repeated 1000 times > > > Thanks, > > Jie Yu > >
