Parallel tasks

In reply to Moein75:
It would help if you were more specific about your usage of the tasks.
If your n==2, show us the code.
Tasks are called and automatic tasks are dynamically created and destroyed when done.
Objects can be created at elaboration time with the generate endgenerate statement.
That is why I am not clear about your question. What is your usage?
Ben Cohen
Ben@systemverilog.us
Link to the list of papers and books that I wrote, many are now donated.

or Cohen_Links_to_papers_books - Google Docs

Getting started with verification with SystemVerilog