# Mutual Exclusion

Kipp the Kidd (mcmudge@mailbox.syr.edu)
Wed, 8 Nov 1995 04:18:24 PST

- Messages sorted by:[ date ][ thread ][ subject ][ author ]

    On Tue, 7 Nov 1995, CJ Holmes wrote:

    > 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?

    Say what?  Are you writing to the wrong mailing list?  If I am not as
    confused as I think I am, try adding a second variable that tells the 2
    statements not to access the 1st.

    - Kipp