"

2013 FRC Java API

"

com.sun.cldc.jna
Class TaskExecutor

java.lang.Object
  extended by com.sun.cldc.jna.TaskExecutor

public class TaskExecutor
extends Object

A TaskExecutor is a native thread that can be used to run native functions.


Field Summary
static int MAX_NUM_CACHABLE_TASK_EXECUTORS
           
static int TASK_PRIORITY_HI
           
static int TASK_PRIORITY_LOW
           
static int TASK_PRIORITY_MED
           
protected  Address te
           
 
Constructor Summary
TaskExecutor(String name)
          Create a natve thread with the given name, default priority and default stack size.
TaskExecutor(String name, int priority, int stacksize)
          Create a natve thread with the given name, priority and stack size.
 
Method Summary
 void cancelTaskExecutor()
          Tell TaskExecutor to stop running new NativeTasks.
 int deleteTaskExecutor()
          Delete the native resources behind this TaskExecutor.
 void stopTaskExecutor()
          Cancel the TaskExecutor and delete when TaskExecutor done.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TASK_PRIORITY_HI

public static final int TASK_PRIORITY_HI
See Also:
Constant Field Values

TASK_PRIORITY_MED

public static final int TASK_PRIORITY_MED
See Also:
Constant Field Values

TASK_PRIORITY_LOW

public static final int TASK_PRIORITY_LOW
See Also:
Constant Field Values

MAX_NUM_CACHABLE_TASK_EXECUTORS

public static final int MAX_NUM_CACHABLE_TASK_EXECUTORS
See Also:
Constant Field Values

te

protected Address te
Constructor Detail

TaskExecutor

public TaskExecutor(String name,
                    int priority,
                    int stacksize)
Create a natve thread with the given name, priority and stack size.

Parameters:
name - name may be passed on to the native thread
priority -
stacksize - zero is default

TaskExecutor

public TaskExecutor(String name)
Create a natve thread with the given name, default priority and default stack size.

Parameters:
name - name may be passed on to the native thread
Method Detail

cancelTaskExecutor

public void cancelTaskExecutor()
Tell TaskExecutor to stop running new NativeTasks. Any NativeTasks that were pending on the TaskExecutor's run queue will be signalled as completing with an error.


deleteTaskExecutor

public int deleteTaskExecutor()
Delete the native resources behind this TaskExecutor. Must call cancelTaskExecutor() first. If the TaskExecutor hasn't finished cleaning up, return error code.

Returns:
zero on success

stopTaskExecutor

public void stopTaskExecutor()
Cancel the TaskExecutor and delete when TaskExecutor done.


"

2013 FRC Java API

"

"
For updated information see the Java FRC site
"