mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
Deferred deletion of allocations in main thread
Add a clearQueueTillFirstFailure interface to DeferredDeleter, which iterates the queue from the front and delete the allocations in the queue till a failure. It is called by defer deletion of allocations occupied by mutliple contexts to unlock the execution in main thread Related-To: NEO-7532 Signed-off-by: HeFan2017 <fan.f.he@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
a572f6ce95
commit
c268e30189
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2022 Intel Corporation
|
||||
* Copyright (C) 2018-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -31,11 +31,13 @@ class DeferredDeleter {
|
||||
|
||||
MOCKABLE_VIRTUAL void drain(bool blocking);
|
||||
|
||||
MOCKABLE_VIRTUAL void clearQueueTillFirstFailure();
|
||||
|
||||
protected:
|
||||
void stop();
|
||||
void safeStop();
|
||||
void ensureThread();
|
||||
MOCKABLE_VIRTUAL void clearQueue();
|
||||
MOCKABLE_VIRTUAL void clearQueue(bool breakOnFailure);
|
||||
MOCKABLE_VIRTUAL bool areElementsReleased();
|
||||
MOCKABLE_VIRTUAL bool shouldStop();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user