18 #ifndef _DECAF_UTIL_CONCURRENT_EXECUTORS_H_ 19 #define _DECAF_UTIL_CONCURRENT_EXECUTORS_H_ 31 namespace concurrent {
34 class ExecutorService;
65 RunnableAdapter(
const RunnableAdapter&);
66 RunnableAdapter operator= (
const RunnableAdapter&);
74 virtual ~RunnableAdapter() {
211 "The Runnable task argument cannot be NULL");
214 return new RunnableAdapter<E>(task, owns, E());
237 "The Runnable task argument cannot be NULL");
240 return new RunnableAdapter<E>(task, owns, result);
245 static void initialize();
246 static void shutdown();
A task that returns a result and may throw an exception.
Definition: Callable.h:47
#define NULL
Definition: Config.h:33
#define DECAF_CATCHALL_NOTHROW()
A catch-all that does not throw an exception, one use would be to catch any exception in a destructor...
Definition: ExceptionDefines.h:62
public interface ThreadFactory
Definition: ThreadFactory.h:52
An Executor that provides methods to manage termination and methods that can produce a Future for tra...
Definition: ExecutorService.h:56
static Callable< E > * callable(decaf::lang::Runnable *task, const E &result, bool owns=true)
Returns a Callable object that, when called, runs the given task and returns the default value of the...
Definition: Executors.h:233
static Callable< E > * callable(decaf::lang::Runnable *task, bool owns=true)
Returns a Callable object that, when called, runs the given task and returns the default value of the...
Definition: Executors.h:207
Definition: NullPointerException.h:32
#define DECAF_API
Definition: Config.h:29
Interface for a runnable object - defines a task that can be run by a thread.
Definition: Runnable.h:29
Definition: Threading.h:36
Implements a set of utilities for use with Executors, ExecutorService, ThreadFactory, and Callable types, as well as providing factory methods for instance of these types configured for the most common use cases.
Definition: Executors.h:43
virtual void run()=0
Run method - called by the Thread class in the context of the thread.
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements...
Definition: AprPool.h:25