 of locks or and synchronization between threads right because you will have some sort of some piece of code which are critical which are basically critical sections and you cannot afford to have multiple threads modify those critical sections at the same time right. And similarly you would need some way to communicate between multiple threads you may have a worker thread and a master thread and the when the worker thread is done you should notify the master thread that with the result of the calculation right. And finally you would have to deal with exceptions so Haskell though most of the code you would write will be pure and they hopefully won't be any exceptions or errors in that code but when you're working with real world examples you have to deal with exceptions like you know network is out or disk is full or your code has to deal with them right. And finally transactions so sometimes in your code you would have cases where you want to modify multiple things multiple variables in a single atomic transaction right so that the effect is visible all at once. So Haskell provides great tools to deal with all of these so we're going to look at that then. First of all I assume that people are familiar with Haskell here because I'm not going to talk about the syntax or the libraries or how to structure code and such. I'm just going to directly jump into the concurrency tools it provides. So this is what we're going to do to demonstrate the tools. We're going to write a multi user chat right. A chat server is a typical example of a concurrent program and we'll see how we do that. The features we're going to have are very like sparse. We're just going to have a bunch of users it should be able to have like user should be able to log into the chat server and talk among each other like private messages which is what I call message here and then there'll be channels in the server in which multiple users can join and then talk in the channel so when you talk in the channel everyone else who is following that channel or in the channel gets a notification right so which I called a tell right so that's all we're going to have only two features and this is the plan. First thing we're going to do is add the ability to accept the user's connections right so you should be the server should be able to accept the user connections and keep it open as long as the user is connected. Then we're going to add user to user chat then hopefully if you have time we're going to look into user quitting and user just going away becoming inactive how to deal with that and then we're going to implement channels leaving joining channels and chatting in the