Task (computing): Difference between revisions

Content deleted Content added
CrasherX (talk | contribs)
Terminology: Java executors
Line 9:
 
In the sense of "unit of work", in a job (meaning "one-off piece of work") a task can correspond to a single step (the step itself, not the execution thereof), while in [[batch processing]] individual tasks can correspond to a single step of processing a single item in a batch, or to a single step of processing all items in the batch. In online systems, tasks most commonly correspond to a single ''request'' (in [[request–response]] architectures) or a ''query'' (in [[information retrieval]]), either a single stage of handling, or the whole system-wide handling.
 
===Examples===
In the [[Java (programming language)|Java]] programming language, these two concepts (unit of work and unit of execution) are conflated when working directly with threads, but clearly distinguished in the [https://docs.oracle.com/javase/tutorial/essential/concurrency/executors.html Executors] framework:
{{quote|When you work directly with threads, a <code>Thread</code> serves as both a unit of work and the mechanism for executing it. In the executor framework, the unit of work and the execution mechanism are separate. The key abstraction is the unit of work, which is called a ''task''.<ref>{{cite book |author-link = Joshua Bloch |first = Joshua |last = Bloch |title = Effective Java |edition = Third |page=[https://books.google.com/books?id=BIpDDwAAQBAJ&lpg=PT431&ots=LwbKdbR4_b&dq=%22the%20key%20abstraction%20is%20the%20unit%20of%20work%22&pg=PT431#v=onepage&q=%22the%20key%20abstraction%20is%20the%20unit%20of%20work%22&f=false p. 272], Item 68}}</ref>}}
 
===IBM terminology===