Name: _____________________________ 6 Digit StudentID: ___ ___ ___ ___ ___ ___

Worksheet 24: arrive, awaitAdvance, and Shared Work

class Phaser

PhaserUtils

Draw The Computation Graph To The Right

realizeProjectIsDueTomorrow();
panic();
pullItTogether();
makePlan();
Phaser ph = new Phaser();
ph.register();
Future<Void> f = void_fork(()->{
    designBackEndApiAndWriteStubs();
    ph.arrive();
    implementBackEnd();
});
writeFrontEndCSS();
PhaserUtils.awaitAdvanceForPhase(ph, 0);
implementFrontEndJavascript();
join(f);
testSystem();

What can run in parallel with:

realizeGroupProjectIsDueTomorrow()?

panic()?

pullItTogether()?

makePlan()?

designBackEndApiAndWriteStubs()?

implementBackEnd()?

writeFrontEndCSS()?

implementFrontEndJavascript()?

testSystem()?

Iterative Averaging Shared Work

Imagine an array of length 20 below which is sliced up into 3 Ranges A, B, and C:

For Sliced Range A

 

 

For Sliced Range B

 

 

For Sliced Range C

 

 

Post Lecture

Synthesize today's class session

 

 

What is unclear?