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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T14:16:28+00:00 2026-05-23T14:16:28+00:00

Im doing a web application that will play a media. I have a class

  • 0

Im doing a web application that will play a media.
I have a class A that contains a method ,say MyMethod:

public void MyMethod()
        {
            .....
            Process proc = ....
            ThreadPool.UnsafeQueueUserWorkItem((o) =>
            {
                proc.WaitForExit();
                proc.Close();
                .....

             },null);
          }

in code behind of my page I will call this method that will run the process and then will play the media, the process converts file to .flv type.My problem is becoz im using an asynchronous system,even if the thread didnt finish its work on unload, the page will load but without playing the media. How can i wait for the process inside the ThreadPool to terminate ? and THEN load my page ?? thanks alot.

  • 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-23T14:16:29+00:00Added an answer on May 23, 2026 at 2:16 pm

    if you want your asp.net resqponse to wait for the process result, call WaitForExit directly. Don’t use the ThreadPool.

    If for some reason you feel you absolutely need to use the ThreadPool, you can use a ManualResetEvent to wait for the result in the calling thread.

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

Sidebar

Related Questions

I'm new to Django... I will develop a web application that will have subdomains
I have a straightforward question. I am doing a web application that uses MySQL,
I have a pretty big web application that I created last year using ASP.NET
I have a web application that stores a lot of user generated files. Currently
I am building a web application that will pull event logs from multiple servers
I'm creating a web application that will involve habitual file uploading and retrieval (PDFs,
We have a web application that is sufficiently complicated that it's hard to accurately
We have a web-application that lets the users trigger a request to an external
I have recently designed a web application that I would like to write in
I have a web application that needs to take a file upload from the

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.