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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T01:01:45+00:00 2026-06-08T01:01:45+00:00

I implemented progress bar to show completing status to users when video processes in

  • 0

I implemented progress bar to show completing status to users when video processes in background. it works well on single instance. but mixed it up when two concurrent video process started.

When two video processes initiated by two different users at same time, both users will see mixed progress status sometimes from video process 1, sometimes from another.

Video process on server side initiated with static variable.

public static MediaHandler _mhandler = new MediaHandler();

Progress indication sent to page via

[WebMethod]
public static string GetProgressStatus()
{
    return Math.Round(_mhandler.vinfo.ProcessingCompleted, 2).ToString();
}

Progress request sent by progress bar after every few seconds.

Now my question is how i can set mediahandler object which can target only one instance at a time.

e.g progress bar 01 shows status of video process 01 only

and

progress bar 02 shows status of video process 02 only

  • 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-08T01:01:47+00:00Added an answer on June 8, 2026 at 1:01 am

    Thanks for sharing ideas but unfortunately no solution solve issue of concurrency in case of using static objects which is almost shared across all users. Now i made some adjustments which solved my problem.

    Instead of using single static object, i used generic list object to stored all concurrent process objects in a list. Here is code.

    public static List<MediaHandler> _lst = new List<MediaHandler>();
    

    Where MediaHandler is class name responsible for processing videos.

    The following function is responsible for initiating video processing

    public static string EncodeVideo(string Source, string Published)
    {   
     MediaHandler _mhandler = new MediaHandler(); 
     ..............
     ..............
     _mhandler.vinfo.ProcessID = Guid.NewGuid().ToString(); 
    // unique guid to attach with each process to identify proper object on progress bar and get info request
    // add media handler object in concurrent static list
     _lst.Add(_mhandler);
     return _mhandler.vinfo.ProcessID; // retuned unique identifier
    }
    

    Now with each progress bar request process id must be sent to function in order to send progress status of proper video processing object.

    [WebMethod]
    public static string GetProgressStatus(string ProcessID)
    {
        string completed_process = "0";
        if (_lst.Count > 0)
        {
            int i = 0;
            for (i = 0; i <= _lst.Count - 1; i++)
            {
                if (_lst[i].vinfo.ProcessID == ProcessID)
                {
                    completed_process = Math.Round(_lst[i].vinfo.ProcessingCompleted, 2).ToString();
                }
            }
        }
    
        return completed_process;
    }
    

    Once processing completed 100% just store all video information in object and remove media handler object from static concurrent list.

    if (_lst[i].vinfo.ProcessingCompleted >= 100)
    {
        // remove from list of corrent processes if processes reach this point
        // store all information of completed process and remove it from list of concurrent processes
        // e.g
        VideoInfo current_uploaded_video_info = _lst[i].vinfo;
         _lst.Remove(_lst[i]);
    }
    

    In this way unlimited number of concurrent processes and progress bar requests made possible.

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

Sidebar

Related Questions

Already finished implementing the player. I want to implement the progress bar. But I
I want to provide a progress bar for my users who upload very large
I want to use progress bar to show the current progress % the rows
I have just implemented an Ajax File Upload control that uses a progress bar.
I want to implement an progress bar in my C++ windows application when downloading
I want to implement a progress bar showing elapsed seconds in bash. For this,
I'm trying to implement a upload progress bar the HTML5 way, by using the
I implemented the Facebook registration on my website. Everything works fine except that suddenly
I have to implement a progressbar that show the progress of a report generation,
Could anyone tell me how to implement a marquee style progress bar in wxPython?

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.