How to implement Composability in Java STM?
up vote
0
down vote
favorite
Composability:
atomic {
x = Queue1.getItem();
Queue2.getItem(x);
}
If either getItem or putItem retries then whole transaction retries. That is the transaction waits until Queue1 is not empty and Queue2 is not full. We don't have to recode putItem or getItem.
java stm
add a comment |
up vote
0
down vote
favorite
Composability:
atomic {
x = Queue1.getItem();
Queue2.getItem(x);
}
If either getItem or putItem retries then whole transaction retries. That is the transaction waits until Queue1 is not empty and Queue2 is not full. We don't have to recode putItem or getItem.
java stm
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
Composability:
atomic {
x = Queue1.getItem();
Queue2.getItem(x);
}
If either getItem or putItem retries then whole transaction retries. That is the transaction waits until Queue1 is not empty and Queue2 is not full. We don't have to recode putItem or getItem.
java stm
Composability:
atomic {
x = Queue1.getItem();
Queue2.getItem(x);
}
If either getItem or putItem retries then whole transaction retries. That is the transaction waits until Queue1 is not empty and Queue2 is not full. We don't have to recode putItem or getItem.
java stm
java stm
asked yesterday
Megha Agarwal
144
144
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53238449%2fhow-to-implement-composability-in-java-stm%23new-answer', 'question_page');
}
);
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password