Prevent race condition (#1889)
Prevent race condition (#1889)

* Make pending Flag to be deleted after write process complete.

* Prevent executing write process until the previous process is completed

* Fix to prevent file write race condition when closing file context

* Make flushing rerun if pendingWrites was added

HiroyasuNishiyama/node-red,mw75/node-red,node-red/node-red,mw75/node-red,HiroyasuNishiyama/node-red,btsimonh/node-red,btsimonh/node-red,namgk/node-red,HiroyasuNishiyama/node-red,mw75/node-red,btsimonh/node-red,node-red/node-red,node-red/node-red,mw75/node-red,namgk/node-red