anchor.diff:      (let ((client (make-client :name (read-line client-stream)
                                  :socket connection
                                  :address (socket-peer-address connection))))
  -      (sb-thread:with-mutex (*client-mutex*)
  +      (with-mutex (*client-mutex*)
           (debug-format t "Added new user ~a@~a ~%"
                         (client-name client)
                         (client-address client))
           (push client *clients*))
         (push-message "@server" (format nil "The user ~s joined to the party!" (client-name client)))
  -      (sb-thread:make-thread #'client-reader
  +      (make-thread #'client-reader
                                :name (format nil "~a reader thread" (client-name client))
                                :arguments (list client)))))
   
   ;; a function defined to handle the errors of client thread
   (defun safe-client-thread (connection)
  +  "This function is a wrapper for CREATE-CLIENT treating the
  +exceptions."
     (handler-case (create-client connection)
       (end-of-file () nil)
       (usocket:address-in-use-error () nil)))
   
   (defun message-broadcast ()
  -  (loop when (sb-thread:wait-on-semaphore *message-semaphore*)
  +  "This procedure is a general independent thread to run brodcasting
  +   all the clients when a message is ping on this server"
  +  (loop when (wait-on-semaphore *message-semaphore*)
             do (let ((message (formated-message (pop *messages-stack*))))
                  (push message *messages-log*)
                  (loop for client in *clients*
  
positive.code:   (socket-close (client-socket client)))
  
  (defun send-message (client message)
    (let ((stream (client-stream client)))
      (write-line message stream)
      (finish-output stream)))
  
  (defun client-reader-routine (client)
    (loop for message = (read-line (client-stream client))
          while (not (equal message "/quit"))
          if (member message +commands-names+ :test #'equal)
            do (send-message client (call-command-by-name message))
          else
            when (> (length message) 0)
  
negative.code:                           (sb-bsd-sockets:not-connected-error () (client-delete client)))))))
  
  (defun connection-handler (socket-server)
    "This is a special thread just for accepting connections from SOCKET-SERVER
     and creating new clients from it."
    (loop for connection = (socket-accept socket-server)
          do (make-thread #'safe-client-thread
                          :arguments (list connection)
                          :name "create client")))
  
  (defun server-loop (socket-server)
    "This is the general server-loop procedure. Create the threads
     necessary for the basic working state of this chat. The main idea
     is creating a MESSAGE-BROADCAST procedure and CONNECTION-HANDLER
     procedure running as separated threads.
  
     The first procedure send always a new message too all clients
     defined on *clients* when *messages-semaphore* is signalized.
     The second procedure is a general connection-handler for new
     clients trying connecting to the server."
    (format t "Running server... ~%")
    (let* ((connection-thread (make-thread #'connection-handler
                                                     :arguments (list socket-server)
                                                     :name "Connection handler"))
           (broadcast-thread (make-thread #'message-broadcast
                                                    :name "Message broadcast")))
      (join-thread connection-thread)
      (join-thread broadcast-thread)))
  
  (defun main ()
    "Well, this function run all the necessary shits."
    (let ((socket-server (socket-listen *host* *port*)))
      (unwind-protect (handler-case (server-loop socket-server)
                        (usocket:address-in-use-error ()
  