Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
WorkItem.cs
1
using
System.Threading.Tasks;
2
3
namespace
Waher.Runtime.Console.Worker
4
{
8
public
abstract
class
WorkItem
9
{
10
private
readonly TaskCompletionSource<bool> processed =
new
TaskCompletionSource<bool>();
11
15
public
abstract
Task
Execute
();
16
21
public
void
Processed
(
bool
Result)
22
{
23
this.processed.TrySetResult(Result);
24
}
25
30
public
Task<bool>
Wait
()
31
{
32
return
this.processed.Task;
33
}
34
}
35
}
Waher.Runtime.Console.Worker.WorkItem
Manages a Console operation.
Definition:
WorkItem.cs:9
Waher.Runtime.Console.Worker.WorkItem.Wait
Task< bool > Wait()
Waits for the item to be processed.
Definition:
WorkItem.cs:30
Waher.Runtime.Console.Worker.WorkItem.Processed
void Processed(bool Result)
Flags the item as processed.
Definition:
WorkItem.cs:21
Waher.Runtime.Console.Worker.WorkItem.Execute
abstract Task Execute()
Executes the console operation.
Waher.Runtime.Console.Worker
Definition:
ConsoleBackgroundColor.cs:5
IoTGateway
Runtime
Waher.Runtime.Console
Worker
WorkItem.cs
Generated by
1.9.5