Skip to content
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

Add locks on getLoggerInstance #175

Open
birschick-bq opened this issue Jan 31, 2023 · 0 comments
Open

Add locks on getLoggerInstance #175

birschick-bq opened this issue Jan 31, 2023 · 0 comments

Comments

@birschick-bq
Copy link
Contributor

If multiple threads try to get the logger instance, 2 logger instances might be created at the same time. This may or may not be an actual issue. Note that locks would impair the run time.

Example:

  // pseudo-code
  getLoggerInstance() {
  // get lock
    if (!_logger)
      _logger =  new Logger();
    // unlock
    return _logger;
  }

AC:

  • add lock protection to getLoggerInstance
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant