Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3485082
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T10:51:53+00:00 2026-05-18T10:51:53+00:00

I am building a node-based drag-and-drop editor, where each node represents one action (for

  • 0

I am building a node-based drag-and-drop editor, where each node represents one action (for example, read this file, or sort this data, etc.) Outputs and inputs of nodes can be connected.

One of the features I’d like to implement is automatic parallelization, so that if a path branches off I can automatically begin a thread to handle each branch. I’m concerned about a few issues, however:

  • If a path branches off, but then later joins back together, I will need to synchronize them somehow
  • If there are multiple start-nodes (where execution begins), their paths will have to be managed separately and then possibly dynamically joined/merged
  • I want to limit how many threads are created so that I don’t suddenly have 20 threads deadlocked

Essentially, I’d like to know if any strategies for doing something like this exist (not looking for code necessarily; just theory). Could scheduling algorithms help?

Thanks for your advice! I look forward to hearing your suggestions.

Note: I’m using C# 3.5, so none of the fun parallel-tasking abilities are available to me. If necessary, I will make the switch to C# 4.0, but I’d like to avoid this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T10:51:54+00:00Added an answer on May 18, 2026 at 10:51 am

    The Task Parallel Library might be exactly what you’re looking for.

    I imagine your node-based drag-and-drop editor to look like this:

     

          Illustration

     

    Every node is essentially a Task. A Task can be anything — read a file from disk, download some data from the web, or compute anything.

    When a Task has finished, it can ContinueWith one or more other Tasks, passing the result of the old Task to the new Tasks.

    A Task can also consist of waiting for multiple Tasks to finish. WhenAll these Tasks have finished, this Task can continue with another Task, passing the result of all Tasks to the new task.

    The TPL will schedule all these Tasks on a Thread Pool, so Threads can be reused and each Task doesn’t need to have its own Thread. The TPL will find the optimal number of Threads for the system it is running on.

    The Visual Studio Async CTP adds native language support for asynchronous operations to C#, which makes working with Tasks really easy and fun.

    With the TPL it is just a matter of creating Tasks and composing them according to the node layout.

    Complete program code for the above example:

    var t1 = Task.Factory.StartNew<int>(() => 42);
    
    var t2a = t1.ContinueWith<int>(t => t.Result + 1);
    var t2b = t1.ContinueWith<int>(t => t.Result + 1);
    
    var t3a = t2a.ContinueWith<int>(t => t.Result * 2);
    var t3b = t2b.ContinueWith<int>(t => t.Result * 3);
    
    var t4 = TaskEx.WhenAll<int>(t3a, t3b)
                   .ContinueWith<int>(t => t.Result[0] + t.Result[1]);
    
    t4.ContinueWith(t => { Console.WriteLine(t.Result); });
    
    Console.ReadKey();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm building a Node.js / Socket.io project. I have a hash of Users based
I'm building a pretty basic HTML table creator/editor (based on a designMode iframe) at
I'm currently building a node editor ( as in Blender ) and am having
I am building a real-time multi-player browser-based game using node.js. At the moment I
Alright, so I'm building an application based in Node.js and I am using mongoose
I'm building a node server that needs to execute code that might be unsafe.
I'm building a custom node which outputs 3 sets of images, all of which
I'm building an app in Backbone using Node as the backend. As part of
I am building a massively multiplayer game with Node.js and Socket.io. All players will
I am building an ASP.NET web application that will be deployed to a 4-node

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.