Thread Simulation with Swift
In this program multi-thread in Swift demonstrated with simulation.
In consept, there is a mall with 5 floors and 5 elevator. Costumers are enters to mall in ground floor periodicly within a interval sized groups. Every customers takes elevators to go to the randomly assinged floor to them and they spend sometime on floors and they enters to elevator queue to go to ground floor to leave the mall. When elevator queues exceedes the size of 25, new customers gets directed to other elevator and its queue of the floor. When a queue stars for a elevator, that elavator gets activeted, otherwise elevators stays idle. Every elevetor has a thread and with that way huge size of queues get prevented.
Visualisation of the program made with SpriteKit framework.!