Re: [FFmpeg-devel] [PATCH v4] vvcdec: add thread executor

2023-08-22 Thread Nuo Mi
On Thu, Aug 17, 2023 at 12:36 AM Michael Niedermayer wrote: > On Tue, Aug 15, 2023 at 10:50:13PM +0800, Nuo Mi wrote: > > The executor design pattern was inroduced by java > > < > https://docs.oracle.com/en/java/javase/20/docs/api/java.base/java/util/concurrent/Executor.html > > > > it also adapt

Re: [FFmpeg-devel] [PATCH v4] vvcdec: add thread executor

2023-08-22 Thread Nuo Mi
On Tue, Aug 22, 2023 at 8:32 PM James Almer wrote: > > >>> > >> > > "mem.h"->"avutil.h"->"common.h"->""->""->"" > >> > >> Why would bits/pthreadtypes.h be available if there's no pthreads? > >> > > I guess it is related to POSIX. If you check , you will find > > the following code: > > > > /* N

Re: [FFmpeg-devel] [PATCH v4] vvcdec: add thread executor

2023-08-22 Thread James Almer
On 8/22/2023 9:30 AM, Nuo Mi wrote: On Tue, Aug 22, 2023 at 8:23 PM James Almer wrote: On 8/22/2023 9:03 AM, Nuo Mi wrote: On Thu, Aug 17, 2023 at 12:42 AM Rémi Denis-Courmont wrote: Le tiistaina 15. elokuuta 2023, 17.50.13 EEST Nuo Mi a écrit : The executor design pattern was inroduced b

Re: [FFmpeg-devel] [PATCH v4] vvcdec: add thread executor

2023-08-22 Thread Nuo Mi
On Tue, Aug 22, 2023 at 8:23 PM James Almer wrote: > On 8/22/2023 9:03 AM, Nuo Mi wrote: > > On Thu, Aug 17, 2023 at 12:42 AM Rémi Denis-Courmont > > wrote: > > > >> Le tiistaina 15. elokuuta 2023, 17.50.13 EEST Nuo Mi a écrit : > >>> The executor design pattern was inroduced by java > >>> < > >

Re: [FFmpeg-devel] [PATCH v4] vvcdec: add thread executor

2023-08-22 Thread James Almer
On 8/22/2023 9:03 AM, Nuo Mi wrote: On Thu, Aug 17, 2023 at 12:42 AM Rémi Denis-Courmont wrote: Le tiistaina 15. elokuuta 2023, 17.50.13 EEST Nuo Mi a écrit : The executor design pattern was inroduced by java < https://docs.oracle.com/en/java/javase/20/docs/api/java.base/java/util/conc urre

Re: [FFmpeg-devel] [PATCH v4] vvcdec: add thread executor

2023-08-22 Thread Nuo Mi
> > > > > + > > +#if !HAVE_THREADS > > +#define pthread_create(t, a, s, ar) 0 > > +#define pthread_join(t, r) do {} while(0) > > + > > +#define pthread_cond_init(c, a) 0 > > +#define pthread_cond_broadcast(c) do {} while(0) > > +#define pthread_cond_signal(c)

Re: [FFmpeg-devel] [PATCH v4] vvcdec: add thread executor

2023-08-22 Thread Nuo Mi
> > >> +if (pthread_create(&ti->thread, NULL, executor_worker_task, > ti)) > > executor_worker_task() doesn't exist if !HAVE_THREADS, so like i said > above, wrap this for loop. > Not needed since pthread_create is defined to 0 > > ___ ffmpeg-dev

Re: [FFmpeg-devel] [PATCH v4] vvcdec: add thread executor

2023-08-22 Thread Nuo Mi
On Thu, Aug 17, 2023 at 12:42 AM Rémi Denis-Courmont wrote: > Le tiistaina 15. elokuuta 2023, 17.50.13 EEST Nuo Mi a écrit : > > The executor design pattern was inroduced by java > > < > https://docs.oracle.com/en/java/javase/20/docs/api/java.base/java/util/conc > > urrent/Executor.html> it also

Re: [FFmpeg-devel] [PATCH v4] vvcdec: add thread executor

2023-08-19 Thread James Almer
On 8/18/2023 1:17 PM, James Almer wrote: On 8/15/2023 11:50 AM, Nuo Mi wrote: The executor design pattern was inroduced by java it also adapted by python

Re: [FFmpeg-devel] [PATCH v4] vvcdec: add thread executor

2023-08-18 Thread James Almer
On 8/15/2023 11:50 AM, Nuo Mi wrote: The executor design pattern was inroduced by java it also adapted by python Compared to handcrafted th

Re: [FFmpeg-devel] [PATCH v4] vvcdec: add thread executor

2023-08-18 Thread James Almer
On 8/16/2023 1:42 PM, Rémi Denis-Courmont wrote: Le tiistaina 15. elokuuta 2023, 17.50.13 EEST Nuo Mi a écrit : The executor design pattern was inroduced by java it also adapted by python

Re: [FFmpeg-devel] [PATCH v4] vvcdec: add thread executor

2023-08-16 Thread Rémi Denis-Courmont
Le tiistaina 15. elokuuta 2023, 17.50.13 EEST Nuo Mi a écrit : > The executor design pattern was inroduced by java > urrent/Executor.html> it also adapted by python >

Re: [FFmpeg-devel] [PATCH v4] vvcdec: add thread executor

2023-08-16 Thread Michael Niedermayer
On Tue, Aug 15, 2023 at 10:50:13PM +0800, Nuo Mi wrote: > The executor design pattern was inroduced by java > > it also adapted by python > >

[FFmpeg-devel] [PATCH v4] vvcdec: add thread executor

2023-08-15 Thread Nuo Mi
The executor design pattern was inroduced by java it also adapted by python Compared to handcrafted thread pool management, it greatly simpli