On Wed Aug 10 14:12:37 2022 +0000, Torge Matthies wrote:
> So update:
> I used `HeapValidate` to check if `Context`s stay valid after thread
> exit if in use. They don't. It only works because either the Context is
> not used once the chores are running or the data in the memory stays
> valid enough for it to not crash. So we don't need to do refcounting.
> This implementation of `_StructuredTaskCollection` here doesn't use the
> context anyway once the chores are running, so there should rarely (if
> ever) be crashes if some program doesn't clean up its task collections.
> For the caching: It seems like there are always n/m Contexts cached,
> with n = the number of logical CPUs (probably
> `CurrentScheduler::GetNumberOfVirtualProcessors()`) and more
> interestingly m = the number of schedulers created (default scheduler +
> any created with `Scheduler_Create`).
I have tested _StructuredTaskCollection behavior on Context destroy, here are some thoughts:
- the _StructuredTaskCollection is not canceled
- destructor is not waiting for chores to finish
- there's no crash if Context is destroyed while tasks are running/scheduled to run
- when context is reused old tasks are gone
I think, that in order to implement it correctly, tasks queue needs to be moved to scheduler. On _Context destroy, all tasks created by the context should be removed from the list.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/464#note_6113
--
v2: qasf: Configure WMReader stream selection in asf_reader_init_stream.
qasf: Configure WMReader stream format in asf_reader_init_stream.
qasf: Start/stop the WM reader in asf_reader_init/cleanup_stream.
qasf: Implement ASF Reader filter init_stream and cleanup_stream.
qasf: Wait for IWMReader_Open to complete in ASF Reader Load.
https://gitlab.winehq.org/wine/wine/-/merge_requests/625
mf_media_type_from_wg_format() may return NULL.
Fix Airborne Kingdom crash at start because WG_AUDIO_FORMAT_UNKNOWN is passed to
mf_media_type_from_wg_format().
Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com>
--
v2: winegstreamer: Trace mf_media_type_from_wg_format_{audio|video}().
winegstreamer: Always check the return value from mf_media_type_from_wg_format().
https://gitlab.winehq.org/wine/wine/-/merge_requests/616