title: How does Write Concern in MongoDB Work at Thread level?
body: <p>As I see we can set write concern from the application, I was wondering how will MongoDB handle a scenario like this:</p>
  
  <p>Lets say we have two task/Process (P1 and P2) running on same database (The database has a replica set of three nodes, 1 primary and 2 secondary). 
  P1 has write concern enabled at journal level.
  P2 has write concern enabled at replica leve.(secondary level).</p>
  
  <p>Now what will happen if P1 and P2 both writes to the database?</p>
  
  <p>Will P2 wait for the data written by P1 to be copied to secondary and then write its data to secondary? </p>
  
  <p>or how does it handle it?</p>