• Zhao Zhili's avatar
    avutil/executor: Allowing thread_count be zero · baf3123c
    Zhao Zhili authored
    Before the patch, disable threads support at configure/build time
    was the only method to force zero thread in executor. However,
    it's common practice for libavcodec to run on caller's thread when
    user specify thread number to one. And for WASM environment, whether
    threads are supported needs to be detected at runtime. So executor
    should support zero thread at runtime.
    
    A single thread executor can be useful, e.g., to handle network
    protocol. So we can't take thread_count one as zero thread, which
    disabled a valid usercase.
    
    Other libraries take -threads 0 to mean auto. Executor as a low
    level utils doesn't do cpu detect. So take thread_count zero as
    zero thread, literally.
    Signed-off-by: 's avatarZhao Zhili <zhilizhao@tencent.com>
    baf3123c
Name
Last commit
Last update
compat Loading commit data...
doc Loading commit data...
ffbuild Loading commit data...
fftools Loading commit data...
libavcodec Loading commit data...
libavdevice Loading commit data...
libavfilter Loading commit data...
libavformat Loading commit data...
libavutil Loading commit data...
libpostproc Loading commit data...
libswresample Loading commit data...
libswscale Loading commit data...
presets Loading commit data...
tests Loading commit data...
tools Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
CONTRIBUTING.md Loading commit data...
COPYING.GPLv2 Loading commit data...
COPYING.GPLv3 Loading commit data...
COPYING.LGPLv2.1 Loading commit data...
COPYING.LGPLv3 Loading commit data...
CREDITS Loading commit data...
Changelog Loading commit data...
INSTALL.md Loading commit data...
LICENSE.md Loading commit data...
MAINTAINERS Loading commit data...
Makefile Loading commit data...
README.md Loading commit data...
RELEASE Loading commit data...
configure Loading commit data...