Exemplo n.º 1
0
 @Override
 public void execute() throws Pausable {
   HttpResponse resp = null;
   try {
     point.write(req.toBuffer());
     resp = new HttpResponse();
     resp.readHead(point);
     resp.readBody(point);
     mailbox.put(resp);
   } catch (IOException e) {
     point.close();
     // do it to running schedule for to call selector's wakeup
     Task.yield();
     mailbox.put(new ErrorMsg(e));
   }
 }
Exemplo n.º 2
0
  public void execute() throws Pausable {
    int i = REPETITIONS;
    int value = 888;
    do {

      mymb.put(value);
    } while (0 != --i);
  }