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 9144781
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T10:21:13+00:00 2026-06-17T10:21:13+00:00

I have previously used the ActionBlock via another constructor: ActionBlock<TInput> Constructor (Action<TInput>) But for

  • 0

I have previously used the ActionBlock via another constructor:

ActionBlock<TInput> Constructor (Action<TInput>)

But for the one in the title, with a return type Task, I am not sure what the ActionBlock does with the returned Task. I presume that it is for somehow waiting on an async delegate supplied into the constructor? Can I get a hold of it?

  • 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-17T10:21:15+00:00Added an answer on June 17, 2026 at 10:21 am

    OK I should have guessed that it’s for supplying an asynchonous delegate. I must have been a bit unfamiliar with the syntax for that. Here is an example of one such delegate:

    var writer = new ActionBlock<string>(async url =>
    {
        WebClient wc = new WebClient();
        // using IOCP the thread pool worker thread does return to the pool
        byte[] buffer = await wc.DownloadDataTaskAsync(url);
        string fileName = Path.GetFileName(url);
    
        string name = @"Images\" + fileName;
    
        using (Stream srm = File.OpenWrite(name))
        {
            await srm.WriteAsync(buffer, 0, buffer.Length);
        }
    });
    

    So that delegate async url => can be said to have the type Func<String, Task>.

    The example is from: http://blogs.microsoft.co.il/blogs/bnaya/archive/2012/01/28/tpl-dataflow-walkthrough-part-5.aspx

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was learning Core Data and previously I have used SQLite in one of
Greetings I may have imagined this but does anyone know if Last.fm previously used
I have previously used the GNU FORTRAN compiler gfortran . But since the Intel
I have previously used has_and_belongs_to_many associations in my older Rails apps but am moving
I have used auto complete textbox previously. That auto complete works only when i
I have previously used CakePHP's routing functionality with the greedy star, allowing all the
Can a LINQ expression replace all cases where regex would have previously been used?
I have previously used webdav to access the sent messages on an exchange 2003
I'm familiar with the VisualWorks and Dolphin versions of Smalltalk, but have not previously
i previously used <jsp:useBean> tags that have facility to decide the scope of bean

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.