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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T23:15:13+00:00 2026-05-25T23:15:13+00:00

I have WCF service Service with some method LongTimeMethod. To avoid request timeout I

  • 0

I have WCF service Service with some method LongTimeMethod. To avoid request timeout I do next:

    public void LongTimeMethod(...)
    {
        Thread t = new Thread(delegate() {
            LocalLongTimeMethod(...);
        });
        t.IsBackground = true;
        t.Start();
    }

    private void LocalLongTimeMethod(...)
    {
      SomeOperations();
    }

After that SomeOperations runs 10 times faster(!?). The result of SomeOperations is right. So what is the reason and is it normal?

One more question: is Service instance alive while my thread hasn’t finished?

  • 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-25T23:15:13+00:00Added an answer on May 25, 2026 at 11:15 pm

    So what is the reason and is it normal?

    The method is unlikely to be executing 10 times faster. Since your WCF operation is a void – you aren’t returning anything. Rather, the introduction is the thread is allowing the WCF operation to complete and it will keep processing your work on a different thread.

    So you call your WCF operation, it fires off a thread, and completes. It isn’t going to wait for the thread to finish. If the client calls the operation synchronously, it will appear to have completed to the client even though the background thread is still there doing all the work.

    This is often called “Fire-and-forget”.

    A better option for this that is built into WCF is to create a One Way Contract.

    is Service instance alive while my thread hasn’t finished?

    Most likely it is.

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

Sidebar

Related Questions

I have a WCF service method that I want to perform some action asynchronously
I have some special parameters to all my wcf service methods that are handled
I have a WCF service that is performing some updates across a couple of
I have a WCF service hosted in IIS 7. It takes some minutes until
Looking for some guidance on a WCF service I’m prototyping. I have a WCF
In my project I have a Windows Service and a WCF Service doing some
I have client application that uses WCF service to insert some data to backend
I have a quite simple WCF service method which returns an IQueryable, just for
I have a WCF service method I've implemented that gets passed an IEnumerable [OperationContract]
Suppose I have a WCF service and a method in the contract <ServiceContract()> _

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.