IDisposable implement
thread safe