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

  • SEARCH
  • Home
  • 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 8490617
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T22:10:45+00:00 2026-06-10T22:10:45+00:00

I am designing a small threading framework, and i’d like that threading framework to

  • 0

I am designing a small threading framework, and i’d like that threading framework to be as transparent as possible to the final code, in such a way that it barely affects the syntax of linear code. I’ve thought out most of the pieces, yet something is giving me an itch: How to define a parameter so function calls are NOT resolved until i’ve succesfully switched out their context into a new thread?

The idea:

var myTask = new Transaction();
myTask < xyz.abc();
myTask < xyz.def();
...some more code...
var result = waitfornext myTask;

In essence, myTask would grab the abc() and def() calls and pipeline them into a Thread, then the waitfor operator would block until myTask’s pipeline has finished and code that depended on abc() and def() can continue. In a manner of speaking this IS .Net’s await/async model, but i’d like to re-do it my own way so it can be used across all .Net versions, and possibly be ported to Java/XYZ languages.

The problem:
The abc() and def() calls would be evaluated by the compiler BEFORE feeding their return values to the < operator, what i really want though, is to be able to have those function calls fed to the operator so i can defer execution of them until the pipeline thread is ready to do so.

The rationale:
Unlike the async/await model, you wouldn’t have to modify your methods so they can be async’ed, and you could use any method with the transactioned methods anyway. Another advantage would be that with erasing a couple lines your code would be back to being linear (Not that the async model doesn’t have this advantage, but it’s worth mentioning it anyways)

Any ideas?

  • 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-06-10T22:10:47+00:00Added an answer on June 10, 2026 at 10:10 pm

    Instead of passing xyz.abc() as the parameter, which will be evaluated then and there, instead pass something that can become xyz.abc(), and modify the target method to do the ‘becoming’:

    Change

    var evaluatedNow = SomeMethod(GetParameterValue());
    
    ...
    
    object SomeMethod(SomeType value)
    {
        // Do something with value
    }
    

    To

    var evaluatedLater = SomeMethod(() => GetParameterValue());
    
    ...
    
    object SomeMethod(Func<SomeType> valueGetter)
    {
        SomeType value = valueGetter();
        // Do something with value
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a small database that I need help designing. I have a VB.NET
I'm currently designing a small website and I'd like to implement the forgot your
Today I was designing a transparent PNG background that would only sit in the
A small but important corner of a database that I'm designing will be used
I am designing a small GUI to interface with a piece of code I
I am designing a small website that I want to be able to browse
I am designing a Point-Of-Sale system for a small shop. The shop just have
while designing my user control, i encountered the following problem: i would like to
Im designing my school's website and I kind of want to do like a
I am designing a small website using HTML + JSP. This is my first

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.