+ Post New Thread
Results 1 to 4 of 4
General Chat Thread, That'll be the mutex in General; I'm sure this means something to programmers but it had me confused. Am I just thick?...
  1. #1

    Edu-IT's Avatar
    Join Date
    Nov 2007
    Posts
    7,088
    Thank Post
    402
    Thanked 618 Times in 565 Posts
    Rep Power
    180

    That'll be the mutex

    I'm sure this means something to programmers but it had me confused. Am I just thick?
    Attached Thumbnails Attached Thumbnails That'll be the mutex-appinstall.png  

  2. #2
    gibbo_ap's Avatar
    Join Date
    Nov 2007
    Location
    Staffs, UK
    Posts
    937
    Thank Post
    233
    Thanked 81 Times in 64 Posts
    Rep Power
    36
    (1) Short for mutual exclusion object. In computer programming, a mutex is a program object that allows multiple program threads to share the same resource, such as file access, but not simultaneously. When a program is started, a mutex is created with a unique name. After this stage, any thread that needs the resource must lock the mutex from other threads while it is using the resource. The mutex is set to unlock when the data is no longer needed or the routine is finished.
    doesnt help at all but it was bugging me as i had heard it before

  3. #3


    Join Date
    Feb 2007
    Location
    Northamptonshire
    Posts
    4,685
    Thank Post
    352
    Thanked 794 Times in 714 Posts
    Rep Power
    346
    [ame=http://en.wikipedia.org/wiki/Mutual_exclusion]Mutual exclusion - Wikipedia, the free encyclopedia[/ame]

  4. #4

    powdarrmonkey's Avatar
    Join Date
    Feb 2008
    Location
    Alcester, Warwickshire
    Posts
    4,859
    Thank Post
    412
    Thanked 777 Times in 650 Posts
    Rep Power
    182
    A mutex is a lock on a variable, so that you know you can trust it between interrogating it and setting it.

    Example: I have a variable called var1, which is an ID number for a database row, and two threads - A and B. Thread A checks that var1 equals a sensible row number and then uses it to load the row from the database. However, between checking and using, thread B changes the value to -42, which is rubbish, and thread A gets terminated because it tries to access unallocated memory. A mutex blocks thread B from changing the variable until thread A has finished with it.

SHARE:
+ Post New Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •