Jump to content
tjp1955

Want to start multiple disparate tasks in parallel

Recommended Posts

I have a monitoring tool that has a number of different things that it can optionally monitor. In some cases it needs to send HTTP requests, in other cases it needs to perform a DB query. Lastly, some of these can be run independently and others are dependent on a previous task completing.

Currently it runs through the tasks sequentially but I've been requested to add more tests. So I am thinking about running them in parallel to improve total processing time.

 

I'm a newbie to OTL. I've been going through the tutorials and demos and it seems like there are a dozen different ways to create tasks. So I'm confused as to what to use. As some others have mentioned, all the examples are doing something simple like incrementing an integer or finding primes and are using the same code for each task.

 

So, what I'm mostly confused about is how to set up to do completely different tasks. Is there an example that I haven't found that does two or more different tasks at the same time and the main thread waits for all of them to complete before doing something else (like reporting results)?

It SEEMS like it should be simple but I'm having a hard time getting my head around what needs to be done. If one example just did even the two things mentioned (incrementing an integer and finding primes) that would be a help.

 

Also, I'm thinking I should use the pipeline/stages with multiple tasks to get the sequencing where I need it - yes?

  • Like 1

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×