Browse files

Removed patch to JLPCActor

  • Loading branch information...
1 parent ded6ee1 commit 5155d01696fd97cf9845e6c08c6b8c96b9e35eaa @skunkiferous skunkiferous committed Mar 17, 2013
View
18 src/main/java/org/agilewiki/jactor/lpc/JLPCActor.java
@@ -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) {
@@ -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();
View
10 src/test/java/org/agilewiki/jactor/pingpong/Pinger2.java
@@ -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

0 comments on commit 5155d01

Please sign in to comment.