Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bp.store - consider refactor with event callbacks #225

Open
michbarsinai opened this issue May 8, 2024 · 0 comments
Open

bp.store - consider refactor with event callbacks #225

michbarsinai opened this issue May 8, 2024 · 0 comments

Comments

@michbarsinai
Copy link
Member

michbarsinai commented May 8, 2024

const eB1 = Event("b1");

bp.setCallback(EventSet("p1"), function(event, storage){
    storage.put("a", event.data.aCount);
});

bthread("b1", function (){
    waitFor( Event("A") );
    bp.store.put("v", "b1");
    bp.log.info(bp.store.get("v"));
    request(eB1);
});

bthread("b3",function(){
    request( Event("A") );
    bp.log.info(bp.store.get("v"));
})

Then cancel/deprecate bp.store.put

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant