mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 15:47:26 +08:00
Lock one more case of usage
This commit is contained in:
parent
060bb1afbd
commit
8a4c0c0ac8
@ -188,6 +188,8 @@ namespace osu.Game.Beatmaps
|
|||||||
/// Cancels the asynchronous loading of the contents of this <see cref="WorkingBeatmap"/>.
|
/// Cancels the asynchronous loading of the contents of this <see cref="WorkingBeatmap"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void CancelAsyncLoad()
|
public void CancelAsyncLoad()
|
||||||
|
{
|
||||||
|
lock (beatmapFetchLock)
|
||||||
{
|
{
|
||||||
loadCancellation?.Cancel();
|
loadCancellation?.Cancel();
|
||||||
loadCancellation = new CancellationTokenSource();
|
loadCancellation = new CancellationTokenSource();
|
||||||
@ -195,6 +197,7 @@ namespace osu.Game.Beatmaps
|
|||||||
if (beatmapLoadTask?.IsCompleted != true)
|
if (beatmapLoadTask?.IsCompleted != true)
|
||||||
beatmapLoadTask = null;
|
beatmapLoadTask = null;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private CancellationTokenSource createCancellationTokenSource(TimeSpan? timeout)
|
private CancellationTokenSource createCancellationTokenSource(TimeSpan? timeout)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user