C++/Win32: How to wait for a pending delete to complete

前端 未结 13 1115
不思量自难忘°
不思量自难忘° 2020-11-30 03:20

Solved:

  • Workable solution: sbi\'s answer
  • Explanation for what really happens: Hans\'s answer
  • Explanation for why OpenFile do
13条回答
  •  伪装坚强ぢ
    2020-11-30 03:33

    Silly suggestion - since it fails so infrequently, simply wait some milliseconds on failure and try again.

    Or, if latency is important, switch to another file name, leaving the old file to be deleted later.

提交回复
热议问题