8000 RWLock is important? · Issue #4 · dyson/certman · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
RWLock is important? #4
Open
Open
@stokito

Description

@stokito

The GetCertificate uses a RWLock

func (cm *CertMan) GetCertificate(hello *tls.ClientHelloInfo) (*tls.Certificate, error) {
	cm.mu.RLock()
	defer cm.mu.RUnlock()

	return cm.keyPair, nil
}

Is the lock is really needed? There is really no concurrent modifications. But the lock makes performance slower.

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

      0