gst-plugins-rs/generic/threadshare
François Laignel 2bb071a950 ts/runtime: slight optimizations for sub tasks related operations
Using callgrind with the standalone test showed opportunities for
improvements for sub tasks addition and drain.

All sub task additions were performed after making sure we were
operating on a Context Task. The Context and Task were checked
again when adding the sub task.

Draining sub tasks was perfomed in a loop on every call places,
checking whether there were remaining sub tasks first. This
commit implements the loop and checks directly in
`executor::Task::drain_subtasks`, saving one `Mutex` lock and
one `thread_local` access per iteration when there are sub
tasks to drain.

The `PadSink` functions wrapper were performing redundant checks
on the `Context` presence and were adding the delayed Future only
when there were already sub tasks.
2022-08-18 18:42:18 +02:00
..
examples ts/runtime: slight optimizations for sub tasks related operations 2022-08-18 18:42:18 +02:00
src ts/runtime: slight optimizations for sub tasks related operations 2022-08-18 18:42:18 +02:00
tests ts: migrate elements to try_next / handle_item 2022-08-10 20:10:08 +02:00
build.rs fix-getters-calls 0.3.0 pass 2021-04-20 18:19:58 +02:00
Cargo.toml ts/examples: introduce a standalone pipeline test 2022-08-18 18:42:18 +02:00
LICENSE-LGPLv2 Add LICENSE files to each individual crate 2020-07-10 13:06:28 +03:00