Ready to explain remaining hazard, but accept anyway

13 views
Skip to first unread message

Mark S. Miller

unread,
Jun 27, 2023, 7:52:27 PM6/27/23
to Nicolo Ribaudo, SES Strategy
Hi Nicolo,

I can explain a better abstract form of the hazard, but have not been able to find a concrete example that seems reasonable.

I can also explain another cost of accepting this loss of turn separation.

However, I can also explain why I'm ready to accept your proposal despite both of these "problems".

To be recorded at tomorrow's SES mtg, if you're still up for that?

--
  Cheers,
  --MarkM

Nicolò Ribaudo

unread,
Jun 28, 2023, 6:20:41 AM6/28/23
to Mark S. Miller, SES Strategy
Hi Mark,

I will join the meeting today, so we can talk about it there.

Regards,
Nicolò Ribaudo

Mark S. Miller

unread,
Jun 28, 2023, 3:35:40 PM6/28/23
to Nicolò Ribaudo, SES Strategy
Just a capture of the code I used today to illustrate this, with the transformation steps numbered so we can see them side by side.


// carol.js
export const update = cb => { suspend(); cb(); restore(); };
// if called while update in progress, you may get nonsense
export const query = () => {};


// bob1.js
import { query } from './carol.js';
export const doSomething = () => { use(query()); };

// bob2.js
import { query } from './carol.js';
export const something = use(query());

// bob3.js
import { query } from './carol.js';
export const doSomething = async () => { await 1; use(query()); };


// alice1.js
import { update } from './carol.js';
import { doSomething } from './bob1.js';
update(() => doSomething());

// alice2.js
import { update } from './carol.js';
import defer * as bob from './bob2.js';
update(() => bob.something);

// alice3.js like alice1 but using bob3
import { update } from './carol.js';
import { doSomething } from './bob3.js';
update(() => doSomething());

Reply all
Reply to author
Forward
0 new messages