-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
我想问一下问题 #1
Comments
这里采用的是 swoole 协程,实际上编程上来说是同步的,底层异步调度机制会帮我们维护好连接一致性 |
你还是没有懂我意思。 虽说编写代码是同步的,但是实际还是异步的。 |
如果有两个异步调用。在一个异步回调改了数据 ,然后在第二个异步后回调后存数据 。你会不会觉得这个过程会有问题? |
没有问题的,底层会给你处理好,放心使用 |
协程上下文都会给你保存,哪个连接对应哪段代码! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
数据库读取是异步的,redis也是异步的。假如有两个接口都先读数据库,处理完逻辑。再再写redis。 假如说,有两条接口同时请求,会不会造成数据不一致啊?
The text was updated successfully, but these errors were encountered: