title: the realm is already in a write transaction
body: <p>the realm is already in a write transaction. </p>
  
  <p>How can i avoid this error? is there a way to check realm is in write traction? if realm is in write transaction then closed first then do other work. Now after getting this error "the realm is already in a write transaction." then other tasks connected with realm also not working.</p>