Go Back   CodingForums.com > :: Client side development > JavaScript programming > Ajax and Design

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-23-2008, 11:05 AM   PM User | #1
mlse
Regular Coder

 
mlse's Avatar
 
Join Date: Mar 2005
Posts: 624
Thanks: 20
Thanked 19 Times in 18 Posts
mlse is on a distinguished road
Mutexes in Javascript?

Hi all,

I would like to implement a gracefull mutex class - by gracefull I mean a mutex that avoids the kind of race hazards and CPU hammering that occur with simple code that loops like crazy until a flag is raised in another thread (AKA the newbie programmer's Mutex!).

In other words, how do I implement an atomic silent wait state with a timeout in javascript? Is there a built-in to do it or will I have to write it myself? I know how to do this in Assembly, C, C++, Java, Lisp and PHP but not Javascript!

I'm using AJAX, so perhaps there's a builtin within the AJAX object itself?

Many thanks,

Mike.

Last edited by mlse; 05-23-2008 at 12:02 PM..
mlse is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:23 PM.


Advertisement
Log in to turn off these ads.