提交 0c9251ae 编写于 作者: C CyrusNajmabadi

Actual flushing of data is non-cancellable.

上级 79dfffa6
......@@ -112,9 +112,13 @@ async Task<Task> GetWriteTaskAsync()
// We're currently under a lock, so tell the continuation to run
// *asynchronously* so that the TPL does not try to execute it inline
// with this thread.
//
// Note: this flushing is not cancellable. We've already removed the
// writes from the write queue. If we were not to write them out we
// would be losing data.
var nextTask = existingWriteTask.ContinueWith(
_ => ProcessWriteQueue(connection, writesToProcess),
cancellationToken,
CancellationToken.None,
TaskContinuationOptions.RunContinuationsAsynchronously,
TaskScheduler.Default);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册