[]
public virtual bool runTarget(IThreadRunnable t, object l)
Public Overridable Function runTarget(t As IThreadRunnable, l As Object) As Boolean
| Type | Name | Description |
|---|---|---|
| IThreadRunnable | t | |
| object | l |
| Type | Description |
|---|---|
| bool |
public virtual bool runTarget(IThreadRunnable t, object l, bool async)
Public Overridable Function runTarget(t As IThreadRunnable, l As Object, async As Boolean) As Boolean
| Type | Name | Description |
|---|---|---|
| IThreadRunnable | t | |
| object | l | |
| bool | async |
| Type | Description |
|---|---|
| bool |
Runs the run method of the specified target in an idle thread of this pool. When the target's run method completes, the thread waiting on the lock object is notified, if any. If there is currently no idle thread and the asynchronous mode is not used the method will block until a thread of the pool becomes idle or the calling thread is interrupted. If the asynchronous mode is used then the method will not block and will return false.
public virtual bool runTarget(IThreadRunnable t, object l, bool async, bool notifyAll)
Public Overridable Function runTarget(t As IThreadRunnable, l As Object, async As Boolean, notifyAll As Boolean) As Boolean
| Type | Name | Description |
|---|---|---|
| IThreadRunnable | t | The target. The 'run()' method of this object will be run in an idle thread of the pool. |
| object | l | The lock object. A thread waiting on the lock of the 'l' object will be notified, through the 'notify()' call, when the target's run method completes. If null no thread is notified. |
| bool | async | If true the asynchronous mode will be used. |
| bool | notifyAll | If true, threads waiting on the lock of the 'l' object will be notified trough the 'notifyAll()' instead of the normal 'notify()' call. This is not normally needed. |
| Type | Description |
|---|---|
| bool | True if the target was submitted to some thread. False if no idle thread could be found and the target was not submitted for execution. |