Skip to content

Conversation

@robsdedude
Copy link
Member

No description provided.

Copy link
Contributor

@bigmontz bigmontz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🦀


@app.main_process_start
async def main_process_start(app: T_App) -> None:
app.shared_ctx.running = Semaphore(1)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious about the function of this semaphore.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is to make sure that only one worker process is started. The backend shouldn't use multiple drivers and each process would get its own driver instance. That's basically just a sanity check that the server is started with workers=1 and that that option really does what it claims to do.

@robsdedude robsdedude merged commit bd1f115 into neo4j:5.0 Feb 6, 2024
@robsdedude robsdedude deleted the benchkit branch February 6, 2024 15:29
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

Successfully merging this pull request may close these issues.

3 participants