AsyncProcessorTask apt = (AsyncProcessorTask)asyncExecutor.getAsyncTask(); if (rubyRuntimeQueue.size() == 0){ parkedRequest.offer(apt); return false; } else { try{ apt.getProcessorTask().invokeAdapter(); } catch (IllegalStateException ex){ parkedRequest.offer(apt); return false; } apt.setStage(AsyncTask.POST_EXECUTE); return true; }
this.rubyRuntimeQueue = rubyRuntimeQueue;
AsyncProcessorTask apt = parkedRequest.poll(); if (apt == null) return; apt.setStage(AsyncTask.EXECUTE); try{ apt.doTask(); } catch (IllegalStateException e) { // Runtime was zero, add the token back to the queue. parkedRequest.offer(apt); } catch (IOException ex){ ; // }