Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Making current thread sleep in JS for progress bar

 
sandeep Kumar
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am using a Dojo SortableTable in my application.When I perform some search on one of the columns, datta will be populated from data base. During this elapsed time, A progress bar is shown.

The problem is after getting the data to the browser, it performs a parse on the data, this parsing takes lot of time during which the progress bar is just stable for considerable amount of time.

So I wanted to make current thread sleep in the parse function of JS during iterations. I hope during that sleep time, the CPU time would be given to the progress bar.

If any one has got some information, please suggest me.

Thanks in Advance.

Regards,
Sandeep.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64629
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JavaScript has no concept of threading.
 
sandeep Kumar
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Bear Bibeault,

First of all Thanks for your response.
But is there any way I could make my progress bar move during parsing?

Thanks/Sandeep.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64629
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When the script is busy doing one thing, all else is blocked.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic