Is putting tasks inside the 'body' task of uvm_sequence class a good practice?

I have a bunch of tasks for read and write transactions. I was wondering if there is any way I can put them inside the uvm_sequence body task. Is it a good practice to do this? Thank you!

In reply to piyushkamalakar:

I recommend putting the tasks in parallel to the body() task in a base sequence to allow for re-use.

Thanks for your prompt response on this. Could you please provide me an example for my better understanding?

In reply to piyushkamalakar:

I have a bunch of tasks for read and write transactions. I was wondering if there is any way I can put them inside the uvm_sequence body task. Is it a good practice to do this? Thank you!

Encapsulating functionality in tasks is always a good coding practice. Where you are call these tasks depends on what your objective is.

In reply to piyushkamalakar:

This is what’s known as sequence layering or sequence hierarchy.

https://verificationacademy.com/cookbook/sequences/hierarchy

Thank you so much for your response on this! I appreciate it!

Thanks a lot Dave for providing me this link! I really appreciate it!