class GCDExecutorService extends AbstractExecutorService {

    public List<Runnable> shutdownNow() {
        SecurityManager sm = System.getSecurityManager();
	if ( sm != null ) {
            sm.checkPermission(shutdownPerm);
        }
        return doWithAutoreleasePool(new Callable<List<Runnable>>() {
            public List<Runnable> call() {
                try {
                    shutdownLock.lock();
                    state = State.SHUTDOWN;
                    NSArray queuedTasks = queue.operations();
                    List<Runnable> result = new ArrayList<Runnable>(queuedTasks.count());
                    for (int i = 0; i < queuedTasks.count(); i++) {
                        NSOperation o = Rococoa.cast(queuedTasks.objectAtIndex(i), NSOperation.class);
                        InvocationFutureTask<?> task = tasks.get(o.id());
                        if ( task != null && !(o.isFinished() || o.isCancelled()) ) {
                            result.add(task.getOriginalRunnable());
                        }
                    }
                    queue.cancelAllOperations();
                    tasks.clear();
                    terminateIfDone(queue.operationCount().intValue() == 0);
                    return result;
                } finally {
                    shutdownLock.unlock();
                }
            }
        });
    }

    public  GCDExecutorService();

}