Skip to content

Latest commit

 

History

History
30 lines (15 loc) · 827 Bytes

README.md

File metadata and controls

30 lines (15 loc) · 827 Bytes

Concurrent Banking

🏦💷A simple banking program to perform different transaction concurrently using Haskell built to explain concurrency (and parallelism).

Aim

To simulate a concurrent “banking” system. The main program should spawn ten “customer” threads, and each of these threads model a bank account with a starting balance of £1000. The customers should then (at random intervals) choose one of the other customers (at random) and transfer a random amount of money (between £10 and £50) into their account.

Running the program

To compile the program just use the following command

stack ghci banking.hs -- -threaded -rtsopts

and run it by

./banking

Converted into stack project

So follow the below steps instead

stack setup

stack build

stack exec bank-exec