▁different ▁threads . ▁ ▁Each ▁thread ▁has ▁its ▁own ▁copy ▁of ▁" x ". ▁▁ ▁// Par allel ▁Code : ▁// Sw ap ▁Function ▁// Ass ume ▁the ▁variables ▁have ▁already ▁been ▁initialized ▁ ▁Thread ▁ 1 : ▁x ▁= ▁a ; ▁a ▁= ▁b ; ▁b ▁= ▁x ; ▁ ▁Thread ▁ 2 : ▁x ' ▁= ▁c ; ▁c ▁= ▁d ; ▁d ▁= ▁x ’ ; ▁ ▁Thread ▁ 3 : ▁x ' ’ ▁= ▁e ; ▁e ▁= ▁f ; ▁b ▁= ▁x '' ▁ ▁Example ▁ 2 ▁ ▁Another ▁case ▁in ▁which ▁priv at ization ▁is ▁possible ▁is ▁when ▁a ▁variables ▁value ▁is ▁known ▁before ▁it ▁is ▁used ▁– ▁even ▁if ▁it ▁is ▁not ▁re defined ▁by ▁the ▁same ▁thread . ▁ ▁The ▁example ▁below ▁demonstr ates ▁this . ▁ ▁The ▁variable ▁" x " ▁is ▁re defined ▁in ▁the ▁middle ▁of ▁each ▁thread , ▁however , ▁the ▁value ▁that ▁it ▁is ▁re defined ▁as ▁is ▁known ▁when ▁the ▁program ▁was ▁written . ▁ ▁By ▁making ▁" x " ▁private ▁and ▁defining ▁it ▁at ▁the ▁beginning ▁of ▁each ▁thread , ▁the ▁code ▁can ▁be ▁run ▁in ▁parallel . ▁ ▁The ▁example ▁below ▁first ▁shows ▁the ▁sequ ential ▁code ▁and ▁then ▁how ▁it ▁can ▁parallel ized ▁with ▁the ▁help ▁of ▁priv at ization . ▁ ▁// Sequ ential ▁Code : ▁// Ass ume ▁the ▁variables ▁have ▁already ▁been ▁declared ▁x ▁= ▁ 1 ; ▁y ▁= ▁x ▁* ▁ 3 ; ▁x ▁= ▁ 4 ; ▁z ▁= ▁y