X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fxwt%2FXMLRPC.java;h=ac8324991b30fe8031071015b010ac7a50293ca8;hb=6a96430e10e27fc1de5754cb5add705f929dd109;hp=7325476d93179f30cc7d986a44513345cbf215b4;hpb=16ea48d834626fb9815da2f7632c3633838fb790;p=org.ibex.core.git diff --git a/src/org/xwt/XMLRPC.java b/src/org/xwt/XMLRPC.java index 7325476..ac83249 100644 --- a/src/org/xwt/XMLRPC.java +++ b/src/org/xwt/XMLRPC.java @@ -304,8 +304,8 @@ class XMLRPC extends JS.Callable { InputStream is = http.POST("text/xml", content); try { BufferedReader br = !Log.verbose ? - new BufferedReader(new InputStreamReader(new Filter(is))) : - new BufferedReader(new FilterReader(new InputStreamReader(new Filter(is))) { + new BufferedReader(new InputStreamReader(is)) : + new BufferedReader(new FilterReader(new InputStreamReader(is)) { public int read() throws IOException { int i = super.read(); if (Log.on) Log.log(this, "recv: " + ((char)i)); @@ -360,9 +360,6 @@ class XMLRPC extends JS.Callable { } public final Object call(JS.Array args) throws JS.Exn { - - if (!ThreadMessage.suspendThread()) return null; - try { return call2(args); } catch (IOException se) { @@ -372,10 +369,7 @@ class XMLRPC extends JS.Callable { } catch (JS.Exn jse) { if (Log.on) Log.log(this, jse.toString()); throw jse; - } finally { - ThreadMessage.resumeThread(); } - } /** When you get a property from an XMLRPC, it just returns another XMLRPC with the property name tacked onto methodname. */ @@ -402,24 +396,4 @@ class XMLRPC extends JS.Callable { public AccessibleCharArrayWriter(int i) { super(i); } } - /** private filter class to make sure that network transfers don't interfere with UI responsiveness */ - private static class Filter extends FilterInputStream { - public Filter(InputStream is) { super(is); } - public int read() throws IOException { - java.lang.Thread.yield(); - while(Message.Q.nonThreadEventsInQueue > 0) try { java.lang.Thread.sleep(100); } catch (Exception e) { }; - return super.read(); - } - public int read(byte[] b) throws IOException { - java.lang.Thread.yield(); - while(Message.Q.nonThreadEventsInQueue > 0) try { java.lang.Thread.sleep(100); } catch (Exception e) { }; - return super.read(b); - } - public int read(byte[] b, int i, int j) throws IOException { - java.lang.Thread.yield(); - while(Message.Q.nonThreadEventsInQueue > 0) try { java.lang.Thread.sleep(100); } catch (Exception e) { }; - return super.read(b, i, j); - } - } - }