[Prev][Next][Index][Thread]

# Mutual Exclusion

- Date: Tue, 7 Nov 1995 21:38:57 PST
- From:
- Content-Type: text/plain; charset="us-ascii"

    Is there a way to gurantee that only one task can access a variable at a
    given time?

    I have a financial-flow simulation where hundreds of robotic "consumers"
    are engaging in various transactions.  I suspect I'm getting into trouble
    when I check an account to see if it has the required sum of currency
    withing, and then subtract from it (in the case of a debit).  What if
    another task modifies the account between those two statements?  Is there a
    way I can "lock" the variable in question?

    cjh

    CJ Holmes                                                        Net.Dreams
    Director                                            Internet Service Bureau
    (707) 794-8193                         http://www.netdreams.com/net.dreams/

    -- Our Latest and Greatest: http://www.netdreams.com/registry/

Follow-Ups:

- Re: Mutual Exclusion

- From: Kipp the Kidd <mcmudge@mailbox.syr.edu>

- Re: Mutual Exclusion

- From: Ian Macintosh <ian@iman.internet.co.nz>

- Prev: Re: MOOlynx (e.g.)
- Next: Re: Mutual Exclusion
- Index: MOO-cows
- Thread: MOO-cows

Home | Subject Index | Thread Index