Skip to content

Commit

Permalink
Removed patch to JLPCActor
Browse files Browse the repository at this point in the history
  • Loading branch information
skunkiferous committed Mar 17, 2013
1 parent ded6ee1 commit 5155d01
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 16 deletions.
18 changes: 3 additions & 15 deletions src/main/java/org/agilewiki/jactor/lpc/JLPCActor.java
Expand Up @@ -242,11 +242,7 @@ final public void acceptRequest(final APCRequestSource apcRequestSource,
final RequestSource rs = (RequestSource) apcRequestSource;
final Mailbox sourceMailbox = rs.getMailbox();
if (sourceMailbox == mailbox) {
try {
syncSend(rs, request, rp);
} catch (StackOverflowError e) {
asyncSend(rs, request, rp);
}
syncSend(rs, request, rp);
return;
}
if (sourceMailbox == null) {
Expand All @@ -264,23 +260,15 @@ private void acceptOtherRequest(final Mailbox sourceMailbox,
final EventQueue<List<JAMessage>> srcController = sourceMailbox
.getEventQueue().getController();
if (eventQueue.getController() == srcController) {
try {
syncSend(rs, request, rp);
} catch (StackOverflowError e) {
asyncSend(rs, request, rp);
}
syncSend(rs, request, rp);
return;
}
if (!eventQueue.acquireControl(srcController)) {
asyncSend(rs, request, rp);
return;
}
try {
try {
syncSend(rs, request, rp);
} catch (StackOverflowError e) {
asyncSend(rs, request, rp);
}
syncSend(rs, request, rp);
} finally {
mailbox.dispatchEvents();
mailbox.sendPendingMessages();
Expand Down
10 changes: 9 additions & 1 deletion src/test/java/org/agilewiki/jactor/pingpong/Pinger2.java
Expand Up @@ -101,7 +101,15 @@ public void processRequest(final JLPCActor targetActor,
pinger = (Pinger2) targetActor;
responseProcessor = (RP<HammerResult2>) _responseProcessor;
start = System.nanoTime();
ping();
boolean again = true;
while (again) {
try {
ping();
again = false;
} catch (StackOverflowError e) {
// NOP
}
}
}

@Override
Expand Down

0 comments on commit 5155d01

Please sign in to comment.