Macaulay2 » Documentation
Packages » Macaulay2Doc » The Macaulay2 language » parallel programming with threads and tasks » createTask
next | previous | forward | backward | up | index | toc

createTask -- create a task

Description

i1 : f = x -> 2^x

o1 = f

o1 : FunctionClosure
i2 : t = createTask(f,3)

o2 = <<task, created>>

o2 : Task
i3 : schedule t

o3 = <<task, created>>

o3 : Task
i4 : taskResult t

o4 = 8

Ways to use createTask:

  • createTask(Function)
  • createTask(Function,Thing)

For the programmer

The object createTask is a compiled function.


The source of this document is in Macaulay2Doc/ov_threads.m2:498:0.