
from __future__ import print_function

import legion

@legion.task
def f(task, regions, context, runtime):
    print("inside task f")

@legion.task
def main_task(task, regions, context, runtime):
    print("%x" % legion.c.legion_runtime_get_executing_processor(runtime, context).id)


from __future__ import print_function

import legion

@legion.task
def f(ctx):
    print("inside task f")

@legion.task
def main_task(ctx):
    print("%x" % legion.c.legion_runtime_get_executing_processor(ctx.runtime, ctx.context).id)
    f(ctx)

Update Python example with a task call.
examples: Update Python example with a task call.

  
  from __future__ import print_function
  
  import legion
  
  @legion.task
- def f(task, regions, context, runtime):
+ def f(ctx):
      print("inside task f")
  
  @legion.task
- def main_task(task, regions, context, runtime):
+ def main_task(ctx):
-     print("%x" % legion.c.legion_runtime_get_executing_processor(runtime, context).id)
+     print("%x" % legion.c.legion_runtime_get_executing_processor(ctx.runtime, ctx.context).id)
+     f(ctx)
  
Update Python example with a task call.
## Code Before:

from __future__ import print_function

import legion

@legion.task
def f(task, regions, context, runtime):
    print("inside task f")

@legion.task
def main_task(task, regions, context, runtime):
    print("%x" % legion.c.legion_runtime_get_executing_processor(runtime, context).id)

## Instruction:
Update Python example with a task call.
## Code After:

from __future__ import print_function

import legion

@legion.task
def f(ctx):
    print("inside task f")

@legion.task
def main_task(ctx):
    print("%x" % legion.c.legion_runtime_get_executing_processor(ctx.runtime, ctx.context).id)
    f(ctx)
