ValiDrv

Results 17 comments of ValiDrv

@[kingIZZZY2](https://github.com/kingIZZZY2) This is unrelated to Swoole, but you should look at redis blocking commands. The idea is that each thread can have a coroutine subscribed to a redis blocking command,...

Why do you need preload with Swoole? Your code only loads once on server start.

Your trying to put the connection back twice... Once on error and once in your finally block.

Well... That's a logic problem, not something to do with Swoole, PHP or any programming language... And your not actually catching the exception. You need to wrap your finally stuff...

It doesn't make sense not to have an error/exception if you put back the same connection multiple times, since `put` adds it to a list. So logically you end up...

You could, but it would be easier to have one Swoole server per application, and then use some reverse proxy to send requests to the correct server based on the...

You should not really use those super globals even without Swoole. But when you switch to Swoole, you need to wrap them. Example: ``` class Context { public static function...

Normally you roll your own session, so you set it to some context variable on request, save it after the request. So you don't call the PHP `session_` functions.

> Did you fill in your 2 and 3 incorrectly? I feel like it's the other way around thank you :) had them the other way around

Your moving items example if exactly why this is needed. Say instead of array_pop you have some IO operation, and instead of pushing the data to some array, you yield...