Skip to main content

Tasks

  • October 15, 2018
  • 1 reply
  • 0 views

Can you do programming in visual cobol .net using await and Task operators? I have a very simple method below and wish to use async, Task and await operators.  Is this possible in a windows form application?

 

method-id CreateUser(username as string) returning a as type Task[condition-value] async


end method.


#VisualCOBOL

1 reply

Can you do programming in visual cobol .net using await and Task operators? I have a very simple method below and wish to use async, Task and await operators.  Is this possible in a windows form application?

 

method-id CreateUser(username as string) returning a as type Task[condition-value] async


end method.


#VisualCOBOL

We do not currently support await / async syntax. It is however still possible to use async APIs. If you would like code to execute after a Task has completed, you can use the ContinueWith method on the task that is returned from the async method.

E.g.

          declare t = CreateUser("gromit")
          invoke t::ContinueWith(
              delegate using tr as type Task[condition-value]
                  display tr::Result
              end-delegate)