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

Refactored locking implementation. #2084

Merged
merged 2 commits into from
Jul 5, 2024

Conversation

vdbergh
Copy link
Contributor

@vdbergh vdbergh commented Jun 25, 2024

We have refactored the locking implementation in the worker as a self-contained package "packages/openlock". The package is also available on github

https://github.com/vdbergh/openlock

and on PyPi

https://pypi.org/search/?q=openlock

This PR cleans up the worker code considerably.

@vdbergh
Copy link
Contributor Author

vdbergh commented Jul 4, 2024

Rebased after #2068

We have refactored the locking implementation in the worker
as a self-contained package "packages/openlock". The package is
also available on github

https://github.com/vdbergh/openlock

and on PyPi

https://pypi.org/search/?q=openlock

This PR cleans up the worker code considerably.
@ppigazzini ppigazzini added enhancement worker update code changes requiring a worker update labels Jul 5, 2024
@ppigazzini
Copy link
Collaborator

https://stackoverflow.com/questions/48571212/why-is-sys-exit-causing-a-traceback
A note if some user should report this behavior: the wiki setup for Windows runs worker.py in an interactive session, so it shows a traceback when exiting:

*** Another worker (with PID=3424) is already running in this directory ***
Traceback (most recent call last):
  File "C:\Users\WDAGUtilityAccount\Desktop\worker\worker.py", line 1625, in <module>
    sys.exit(worker())
SystemExit: 1

@vdbergh
Copy link
Contributor Author

vdbergh commented Jul 5, 2024

Is there any particular reason why on Windows Python is invoked as python.exe -i?

@ppigazzini
Copy link
Collaborator

ppigazzini commented Jul 5, 2024

The worker is started with a double click on a launcher cmd, with the -i the user views the traceback in case of error, otherwise the windows simply close.

Copy link
Collaborator

@ppigazzini ppigazzini left a comment

Choose a reason for hiding this comment

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

Tested successfully on:

  • linux
  • windows wsl2
  • windows 10/11 msys2 bash
  • windows 10/11 msys2 cmd

@ppigazzini ppigazzini merged commit 2e96d3f into official-stockfish:master Jul 5, 2024
19 checks passed
@ppigazzini ppigazzini added the iconic idiomatic code speaks for itself label Jul 5, 2024
@ppigazzini
Copy link
Collaborator

Triggered the worker updated, thank you @vdbergh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement iconic idiomatic code speaks for itself worker update code changes requiring a worker update
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants