yii2-queue icon indicating copy to clipboard operation
yii2-queue copied to clipboard

[idea] uncouple drivers and executors

Open mikk150 opened this issue 8 years ago • 5 comments

Maybe drivers should only deal with message sourcing and sinking and create new class definitions that are executors

That way one could implement more executors.

I have issue that I would like to use Db driver, but that currently forces me to use CLI executor (or as far as I can see everything is using CLI executor except sync)

but what If I wanted to create another type of executor? (currently on older one I created Threaded executor(Was based on controller))pthreads

mikk150 avatar Aug 03 '17 08:08 mikk150

I have a problem with build a fresh php + pthreads

/pthreads/php_pthreads.c:38:3: error: #error "pthreads requires PHP 7.2, ZTS in versions 7.0 and 7.1 is broken" # error "pthreads requires PHP 7.2, ZTS in versions 7.0 and 7.1 is broken"

bscheshirwork avatar Aug 18 '17 12:08 bscheshirwork

@bscheshirwork this queue even does not implement pthreads..

mikk150 avatar Aug 18 '17 13:08 mikk150

@mikk150 yes, I use the CLI executor and 4 separated worker process started with supervisor.

You tell about a one process and many workers in separated thread?

bscheshirwork avatar Aug 18 '17 13:08 bscheshirwork

My idea is to have ability to tie different executors and messengers together

So I could put Gearman messenger together with for example Pthreads executor

My issue is that right now executors are synchronous, but they should really be Asynchronous

Maybe something like Promise... I am hacking smth together, somebody wants they can join in...

mikk150 avatar Aug 18 '17 13:08 mikk150