public static boolean handleOfferViaHandshakeChannels(WorkList workList,
			boolean containsDefault, PseuCoThread defaultThread) {
		if(workList.getWorkList().isEmpty()){
			return false;
		}
		LinkedList<WorkList> handshakeListCopy = new LinkedList<WorkList>();
		for (WorkList list : handshakeList) {
			handshakeListCopy.add(list);
		}

		Random r = new Random();
		int index = -1;
		while (handshakeListCopy.size() != 0) {
			index = r.nextInt(handshakeListCopy.size());
			WorkList wList = handshakeListCopy.get(index);

			for (Work w : wList.getWorkList()) {
				for (Work work : workList.getWorkList()) {
					if (w.isInput() != work.isInput
							&& w.getChannel().equals(work.channel)) {
						handshakeList.remove(wList);

						Work workContainigMessage;
						if (work.getMessage() != null) {
							workContainigMessage = work;
						} else {
							workContainigMessage = w;
						}
						w.getThread().addMessage(
								new Message(workContainigMessage.getMessage(),
										w.getWorkId()));
						work.getThread().addMessage(
								new Message(workContainigMessage.getMessage(),
										work.getWorkId()));

						synchronized (w.getThread()) {
							w.getThread().notifyAll();
						}
						return true;
					}
				}
			}
			handshakeListCopy.remove(index);

		}
		if (containsDefault) {
			defaultThread.addMessage(new Message("", -1));
			return true;
		}
		handshakeList.add(workList);
		return false;
	}