Skip to content
This repository has been archived by the owner on Oct 28, 2024. It is now read-only.

优化OpenAIClient类代码,双检锁单例加volatile修饰 #85

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

IDJack
Copy link
Contributor

@IDJack IDJack commented May 6, 2023

OpenAiStreamClient OPEN_AI_STREAM_CLIENT的创建用了传统的双检锁单例模式,但存在线程安全问题,需要加volatile修饰

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant