Skip to content

ServiceFactory单例模式的实现方式,锁的粒度也太大了吧,高并发下会严重影响性能 #4

Description

@songjiesdnu

public static final synchronized ServiceFactory getInstance() throws SdkInitException { if (serviceFactory != null) { return serviceFactory; } return getInstance(new DefaultConfig()); }

锁直接加载了方法方法上,高并发下性能会比较差

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions