AIMP Forum

AIMP for PC => Дополнения / Addons => Разработка / Development => Topic started by: Moshi0 on August 28, 2018, 00:11:40

Title: How to support asynchronous access in custom Music Library
Post by: Moshi0 on August 28, 2018, 00:11:40
How exactly should i support asynchronous access in IAIMPMLDataProvider::GetData and IAIMPMLGroupingTreeDataProvider::GetData?
Do I use IAIMPMLDataStorageManager::BackgroundTaskStarted? And I cant block thread in GetData so what do I return?
Title: Re: How to support asynchronous access in custom Music Library
Post by: Artem on August 28, 2018, 15:49:51
You should bear in mind that these methods may be called from different threads, and at same time.
Title: Re: How to support asynchronous access in custom Music Library
Post by: Moshi0 on August 29, 2018, 01:16:29
Oh ok, makes sense. I thought you had to somehow make the methods non blocking.
Thanks.